예제 #1
0
 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());
 }
예제 #2
0
 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;
 }
예제 #3
0
    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;
    }
예제 #4
0
    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);
    }
예제 #5
0
    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);
    }
예제 #6
0
    // 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;
        }
    }