示例#1
0
 //(コマンド)
 public void Attack(Player.MoveComand comand)
 {
     AnimFunc(comand);
 }
示例#2
0
    //アニメーション再生
    void AnimFunc(Player.MoveComand comand)
    {
        info_ = anim.GetCurrentAnimatorStateInfo(0);
        //いつでも来てしまうため
        if (!info_.IsName("idol"))
        {
            return;
        }
        AnimCheck = true;
        switch (comand)
        {
        case Player.MoveComand.None:
            break;

        case Player.MoveComand.Left:
            if (player.PlayerID == 1)
            {
                MoveBack();
            }
            else
            {
                MoveFront();
            }
            break;

        case Player.MoveComand.Right:
            if (player.PlayerID == 2)
            {
                MoveBack();
            }
            else
            {
                MoveFront();
            }
            break;

        case Player.MoveComand.Up:
            if (player.PlayerID == 1)
            {
                MoveLeft();
            }
            else
            {
                MoveRight();
            }
            break;

        case Player.MoveComand.Down:
            if (player.PlayerID == 2)
            {
                MoveLeft();
            }
            else
            {
                MoveRight();
            }
            break;

        case Player.MoveComand.Attack_1:
            Attack1();
            break;

        case Player.MoveComand.Attack_2:
            Attack2();
            break;

        case Player.MoveComand.Attack_3:
            Attack3();
            break;

        case Player.MoveComand.Attack_4:
            Attack4();
            break;
        }
    }
示例#3
0
 //(プレイヤーの場所,目的地,コマンド)
 public virtual void Move(GameObject Player, Vector3 Goal, Player.MoveComand comand)
 {
     AnimFunc(comand);
     StartCoroutine(enumerator(Player, Goal));
 }