Пример #1
0
        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);
            }
        }
Пример #2
0
 public void Launch(AnimationEventModel animationEventModel)
 {
     this.animationEventModel = animationEventModel;
     this._Launch();
 }
Пример #3
0
 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));
 }