public override void Enter(Piece piece) { _main_script = piece.GetComponent <TowerBoss>(); _main_script.RigidBody.velocity = Vector2.zero; _main_script.CanMove = false; _main_script.StartCoroutine(CWaitTime()); }
public override void Enter(Piece piece) { base.Enter(piece); _main_script = piece.GetComponent <TowerBoss>(); _main_script.RigidBody.velocity = Vector2.zero; _main_script.MovementDirection = Vector2.zero; _main_script.CanMove = false; }
public override void Enter(Piece piece) { _main_script = piece.GetComponent <TowerBoss>(); _main_script.CanMove = true; destination = ChooseDestination(); dir = DirectionToDestination(); _main_script.StartCoroutine(CWalkTime()); _main_script.RigidBody.velocity = Vector2.zero; }
public override void Enter(Piece piece) { base.Enter(piece); _main_script = piece.GetComponent<TowerBoss>(); _main_script.RigidBody.velocity = Vector2.zero; _main_script.StartCoroutine(CWaitToDash()); _main_script.RigidBody.velocity = Vector2.zero; // Toca a animação _main_script.GetComponent<ClassAnimator>().Stop(); _main_script.GetComponent<ClassAnimator>().Play("Prepare", 0, true,true); }
public override void Enter(Piece piece) { _main_script = piece.GetComponent <TowerBoss>(); _main_script.RigidBody.velocity = Vector2.zero; _main_script.CanMove = false; // Toca a animação _main_script.GetComponent <ClassAnimator>().Stop(); _main_script.GetComponent <ClassAnimator>().Play("Idle", 0, true, true);; _main_script.StartCoroutine(CWaitTime()); totalSpawn = (int)Random.Range(3, 5); }
// Use this for initialization void Start() { // Toca o som SoundManager.Play("cannon"); CannonBall = Resources.Load <GameObject>("Active Objects/Bosses/TowerBoss/AtkArea/FakeCannonBall"); CannonBall.transform.localScale = transform.localScale * 2; _boss = FindObjectOfType <TowerBoss>(); StartCoroutine(CExplosionTimer()); _own_cannon_ball = Instantiate(CannonBall, _boss.transform.position, Quaternion.identity); _own_cannon_ball.GetComponent <FakeCannonBall>().Destination = transform.position; _own_cannon_ball.GetComponent <FakeCannonBall>().Pivot = gameObject; if (special) { _own_cannon_ball.GetComponent <FakeCannonBall>().time = ExplosionTimer / 2; _own_cannon_ball.GetComponent <FakeCannonBall>().special = true; } else { _own_cannon_ball.GetComponent <FakeCannonBall>().time = ExplosionTimer * 1.5f; } }