示例#1
0
    void Awake()
    {
        rBody.velocity = this.transform.right * speed;

        if (rBody.velocity.x < 0)
        {
            powerType = Power.Type.Body;
            offset   *= -1;
        }
        else
        {
            powerType = Power.Type.Mind;
        }

        this.transform.position += Vector3.right * offset;
    }
示例#2
0
 public Boss GetBoss(Power.Type type)
 {
     if (type == Power.Type.Mind)
     {
         return(mindBoss);
     }
     else if (type == Power.Type.Body)
     {
         return(bodyBoss);
     }
     else
     {
         Debug.LogError("Unkown boss type");
         return(null);
     }
 }
示例#3
0
 public static void SetPower(Power.Type newPower)
 {
     SelectedPower = newPower;
 }