public void ActionEvent(Action source, GameObject gameObjectParam = null, ActionEventType events = ActionEventType.Compeleted, int intParam = 0, string strParam = null) { UFOFactory ufofactory = Singleton <UFOFactory> .Instance; ufofactory.freeUFO(gameObjectParam); }
public void ActionEvent(Action source, GameObject gameObjectParam = null, ActionEventType events = ActionEventType.Compeleted, int intParam = 0, string strParam = null) { if (events == ActionEventType.Started) { slowFlyAction = FlyAction.getAction(new Vector3(Random.Range(-1, 1f), Random.Range(-1, 1f)), slowSpeed); middleFlyAction = FlyAction.getAction(new Vector3(Random.Range(-1, 1f), Random.Range(-1, 1f)), middleSpeed); fastFlyAction = FlyAction.getAction(new Vector3(Random.Range(-1, 1f), Random.Range(-1, 1f)), fastSpeed); this.RunAction(gameObjectParam, source, this); } else if (events == ActionEventType.Compeleted) { UFOFactory ufofactory = Singleton <UFOFactory> .Instance; ufofactory.freeUFO(gameObjectParam); } }
//move gameObject public void hit(GameObject gameObject) { ufoFactory.freeUFO(gameObject); scoreRecorder.addScore(round); }