mycj_demo/mycj/Assets/Game/Scripts/Application/Object/FBBottle.cs

58 lines
1.5 KiB
C#
Raw Normal View History

2024-12-02 09:37:47 +08:00
// Felix-BangFBBottle
//   へ     /|
//  /7    ∠_/
//  / │    
//  Z _,    /`ヽ
// │     ヽ   /  〉
//  Y     `  /  /
// イ● 、 ●  ⊂⊃〈  /
// ()  へ    | \〈
//  >ー 、_  ィ  │
//  / へ   / ノ<|
//  ヽ_ノ  (_  │//
//  7       |
//  ―r ̄ ̄`ー―_
// Describe瓶子炮塔
// Createtime2018/10/18
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace FBApplication
{
public class FBBottle : FBTower
{
Transform f_shotPoint;
protected override void Awake()
{
base.Awake();
f_shotPoint = transform.Find("ShotPoint");
}
#region
protected override void Shot(FBMonster monster)
{
base.Shot(monster);
if (f_animator.gameObject.activeSelf)
f_animator.SetTrigger("IsAttack");
GameObject go = FBGame.Instance.ObjectPool.Spawn("BallBullet");
FBBallBullet bullet = go.GetComponent<FBBallBullet>();
bullet.transform.position = f_shotPoint.position;
bullet.Load(UseBulletID, Level, MapRect, monster);
}
public override void OnSpawn()
{
base.OnSpawn();
f_animator.Play("Bottle_Idle");
}
#endregion
}
}