public static Action getAction(int score, float _speed) { ThrowUFO action = ScriptableObject.CreateInstance <ThrowUFO>(); action.factory = Factory_UFO.getInstance(); action.ufo = action.factory.getProduct(); action.speed = _speed; action.ufo.Score = score; action.ufo.canHit = true; action.gameobject = action.ufo.gameobject; return(action); }
static public Action getAction(int roundNum) { List <Action> acList = new List <Action>(); acList.Add(roundHint.getAction(roundNum)); switch (roundNum) { case 1: for (int times = 3; times-- != 0;) { acList.Add(ThrowUFO.getAction(1, 20)); } break; case 2: for (int times = 3; times-- != 0;) { acList.Add(ThrowUFO.getAction(2, 20)); } break; case 3: for (int times = 5; times-- != 0;) { acList.Add(ThrowUFO.getAction(5, 30)); } break; case 4: for (int times = 10; times-- != 0;) { acList.Add(ThrowUFO.getAction(5, 40)); } break; } return(SequenceAction.getAction(acList)); }