Esempio n. 1
0
    //移動するスピードと方法を変更する
    public void MoveUpdate(TurnPoint turnpoint)
    {
        int new_direction = (int)turnpoint.direction;

        switch (new_direction)
        {
        case 0:
            x = 0.0f;
            y = speed_y;
            break;

        case 1:
            x = speed_x;
            y = 0.0f;
            break;

        case 2:
            x = 0.0f;
            y = -speed_y;
            break;

        case 3:
            x = -speed_x;
            y = 0.0f;
            break;
        }
        direction = new_direction;
    }
Esempio n. 2
0
 //関数/////////////////////////////////////////////////////////////////////
 void Awake()
 {
     //シングルトン参照
     if (obj != this)
     {
         obj = this;
     }
 }
Esempio n. 3
0
 private void Start()
 {
     turnpoint = GetComponent <TurnPoint>();
 }
Esempio n. 4
0
 //関数/////////////////////////////////////////////////////////////////////
 void Awake()
 {
     //シングルトン参照
     if(obj != this) obj = this;
 }