Пример #1
0
    void Update()
    {
        if (Enemy.IsVirus1Playing)
        {
            RandomState.StateLimits = 3;
            RandomState.RandomStateMethod();
            Debug.Log("Virus is choosing");
            switch (RandomState.StateE)
            {
            case 1:
                _states.Attack();
                Debug.Log("2-Invisibility");
                Enemy.IsVirus1Playing         = false;
                BattleMachine.IsEnemyChoosing = false;
                BattleMachine.OnPlayerTurn    = true;
                break;

            case 2:
                _states.Attack();
                Debug.Log("2-Attack");
                Enemy.IsVirus1Playing         = false;
                BattleMachine.IsEnemyChoosing = false;
                BattleMachine.OnPlayerTurn    = true;
                break;

            case 3:
                _states.Scanner();
                Debug.Log("2-Scanner");
                Enemy.IsVirus1Playing         = false;
                BattleMachine.IsEnemyChoosing = false;
                BattleMachine.OnPlayerTurn    = true;
                break;

            default:
                Debug.Log("el enemy no hace nada we");
                _states.Iddle();
                Enemy.IsVirus1Playing         = false;
                BattleMachine.IsEnemyChoosing = false;
                BattleMachine.OnPlayerTurn    = true;
                break;
            }
        }
    }
Пример #2
0
    // Update is called once per frame
    void Update()
    {
        if (BattleMachine2.IsEnemyChoosing)
        {
            RandomState.StateLimits = 4;
            RandomState.RandomStateMethod();
            Debug.Log("Virus 3 is Choosing");

            switch (RandomState.StateE)
            {
            case 1:
                _states.Attack();
                Debug.Log("2-Attack");
                Enemy3.IsVirus3Playing         = false;
                BattleMachine3.IsEnemyChoosing = false;
                BattleMachine3.OnPlayerTurn    = true;
                break;

            case 2:
                _states.Pixeling();
                Debug.Log("2-Pixel");
                Enemy3.IsVirus3Playing         = false;
                BattleMachine3.IsEnemyChoosing = false;
                BattleMachine3.OnPlayerTurn    = true;
                break;

            case 3:
                _states.Light();
                Debug.Log("2-Light");
                Enemy3.IsVirus3Playing         = false;
                BattleMachine3.IsEnemyChoosing = false;
                BattleMachine3.OnPlayerTurn    = true;
                break;

            case 4:
                _states.Bug();
                Debug.Log("2-Bug");
                Enemy3.IsVirus3Playing         = false;
                BattleMachine3.IsEnemyChoosing = false;
                BattleMachine3.OnPlayerTurn    = true;
                break;

            default:
                _states.Iddle();
                Debug.Log("3-idle");
                break;
            }
        }
    }