Esempio n. 1
0
    public static PsyFlyAction GetSSAction(Vector3 direction, float power)
    {
        PsyFlyAction action = CreateInstance <PsyFlyAction>();

        if (direction.x == -1)
        {
            action.start_vector = Quaternion.Euler(new Vector3(0, 0, -20)) * Vector3.left * power;
        }
        else
        {
            action.start_vector = Quaternion.Euler(new Vector3(0, 0, 20)) * Vector3.right * power;
        }
        action.power = power;
        return(action);
    }
Esempio n. 2
0
 public void PsyFly(GameObject disk, float power)
 {
     fly = PsyFlyAction.GetSSAction(disk.GetComponent <DiskData>().direction, power);
     RunAction(disk, fly, (ISSActionCallback)this);
 }