Exemple #1
0
        void OnEnable()
        {
            WarClientNpcMgr mgr = WarClientManager.Instance.npcMgr;

            if (mgr != null)
            {
                mgr.createUIForNpc = CreateUIForNpc;
            }
            EasyJoystick.On_JoystickTouchStart += On_JoystickStart;
            EasyJoystick.On_JoystickMove       += On_JoystickMove;
            EasyJoystick.On_JoystickTouchUp    += On_JoystickMoveEnd;
        }
        /// <summary>
        /// 战斗的入口在这里
        /// </summary>
        void Awake()
        {
            Instance         = this;
            mainCameraFollow = Main3DCamera.GetComponent <CameraFollow>();

            ///
            /// 获得NPC管理容器
            ///
            npcMgr = new WarClientNpcMgr();
            npcMgr.Init();
            //初始化场景的创建器
            creator = new ClientCreator(this);

            Shake      = Main3DCamera.GetComponent <ShakeCamera>();
            AutoBattle = false;
        }