void LoadAnimation(AnimationEventModel animationEventModel) { if (this.tagToAnimationControllerMap.ContainsKey(animationEventModel.tag)) { currentAnimationController = this.tagToAnimationControllerMap[animationEventModel.tag]; currentAnimationController.Launch(animationEventModel); } else { GameObject animation = Instantiate(Resources.Load(EVENT_ANIMATION_PATH + animationEventModel.prefab)) as GameObject; animation.transform.SetParent(this.transform, false); AnimationController animationController = animation.GetComponent <AnimationController>(); this.tagToAnimationControllerMap.Add(animationEventModel.tag, animationController); currentAnimationController = animationController; animationController.Launch(animationEventModel); } }
public void Launch(AnimationEventModel animationEventModel) { this.animationEventModel = animationEventModel; this._Launch(); }
override public void Launch(OnFinishEvent callBack, DataManager dataManager, EventModel eventManagerModel, GameManager gameManager) { base.Launch(callBack, dataManager, eventManagerModel, gameManager); this.animationEventModel = this.dataManager.animationEventModel.getModelById(eventManagerModel.eventChildId); this.LoadAnimation(this.dataManager.animationEventModel.getModelById(eventManagerModel.eventChildId)); }