public static UFOAction GetUFOAction(Vector3 t, Vector3 s) { UFOAction action = ScriptableObject.CreateInstance <UFOAction>(); action.speed = t; action.force = s; return(action); }
public void PlayDisk(GameObject disk, Vector3 initPosition) { disk.transform.position = initPosition; disk.transform.GetComponent <Rigidbody>().useGravity = false; //this.Update(); UFOAction ac = UFOAction.GetUFOAction(disk.GetComponent <Disk>().direction *disk.GetComponent <Disk>().speed, Vector3.down * 9.8f); RunAction(disk, ac, this); }