Example #1
0
        public void LoadMission(Mission mission, MissionArgs args)
        {
            if (Mission != null)
            {
                throw new InvalidOperationException("Cannot load a mission without unloading previous one");
            }

            Mission = mission;
            mission.Init(args);
        }
Example #2
0
        private void Test1()
        {
            Debug.Log("VAR");
            var args = new MissionArgs();

            args.Sender    = gameObject;
            args.Process   = 1;
            args.MissionId = "1";
            args.TaskId    = "1";
            EventCenter.Instance.Trigger("Mission_1", args);
        }
        public void Initialize(MissionArgs args)
        {
            onComplete = args.OnComplete;

            Root.position   = args.Position;
            Root.localScale = Vector3.one;
            Root.name       = args.MissionInfo.Id;

            informationBehaviour.Initialize(args.MissionInfo);
            timerBehaviour.Reset(args.MissionInfo.Duration);
        }