Exemplo n.º 1
0
 //Constructor
 public Attacking(EnemySM newESM)
 {
     ESM = newESM;
 }
Exemplo n.º 2
0
 //Constructor
 public DeathSet(EnemySM newESM)
 {
     ESM = newESM;
 }
Exemplo n.º 3
0
 //Constructor
 public Idle(EnemySM newESM)
 {
     ESM = newESM;
 }
Exemplo n.º 4
0
 //Constructor
 public Moving(EnemySM newESM)
 {
     ESM = newESM;
 }
Exemplo n.º 5
0
 //Constructor
 public Pursuing(EnemySM newESM)
 {
     ESM = newESM;
 }
Exemplo n.º 6
0
    // Update is called once per frame
    void Update()
    {
        //Debug.Log (action.Count);
        switch (bs)
        {
        case (battleState.WAIT): {
            if ((action.Count > 0) && (playerMeme[0].transform.Find("Selector").gameObject.activeSelf))
            {
                Debug.Log("aaaa");
                bs = battleState.ACTION;
            }
            break;
        }

        case (battleState.ACTION): {
            GameObject atkp = GameObject.Find(action[0].meme);
            if (action[0].type == "Enemy")
            {
                EnemySM ESM = atkp.GetComponent <EnemySM> ();
                ESM.atktarget = action [0].def;
                ESM.curState  = EnemySM.enemyState.ACTION;
            }

            if (action[0].type == "Meme")
            {
                MemeSM MSM = atkp.GetComponent <MemeSM> ();
                MSM.target   = action [0].def;
                MSM.curState = MemeSM.charState.ACTION;
            }

            bs = battleState.PERFORM;
            break;
        }

        case (battleState.PERFORM): {
            break;
        }
        }

        switch (ps)
        {
        case (playerState.WAITING): {
            break;
        }

        case (playerState.SELECT): {
            if (playerMeme.Count > 0)
            {
                //playerMeme [0].transform.Find ("Selector").gameObject.SetActive (true);
                //playerUI.SetActive (true);
                ps = playerState.WAITING;
            }
            break;
        }

        case (playerState.INPUT): {
            break;
        }

        case (playerState.DONE): {
            break;
        }
        }
    }