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); }
public void PsyFly(GameObject disk, float power) { fly = PsyFlyAction.GetSSAction(disk.GetComponent <DiskData>().direction, power); RunAction(disk, fly, (ISSActionCallback)this); }