コード例 #1
0
    private void Die()
    {
        if (StateCurrent == State.Figth)
        {
            AttackBehavior.Untarget();
        }

        StateCurrent = State.Die;
    }
コード例 #2
0
    private void MoveToEnemy(Vector3 position, HealthBehaviour health)
    {
        if (StateCurrent == State.Figth)
        {
            AttackBehavior.Untarget();
        }

        MoveToPosition(position, DistanceToEnemy);
        CreateEffect(position, Vector3.up, EffectFigthRef);

        StartCoroutine(WaitForEndMoveToEnemy(health));

        StateCurrent = State.MoveToEnemy;
    }
コード例 #3
0
    private void MoveToPoint(Vector3 position, Vector3 normal)
    {
        if (StateCurrent == State.Figth)
        {
            AttackBehavior.Untarget();
        }


        MoveToPosition(position);
        CreateEffect(position, normal, EffectMoveRef);

        StartCoroutine(WaitForEndMoveToPoint());

        StateCurrent = State.MoveToPoint;
    }