예제 #1
0
        void Start()
        {
            instance = this;
            AttackEnemyCards_Listenner           atkEnemyCardsListener = new AttackEnemyCards_Listenner();
            CardOfKickTheDoorAtPresent_Listenner cardOfKickTheDoorAtPresentListener = new CardOfKickTheDoorAtPresent_Listenner();
            CardOfTheMonsterAtPresent_Listenner  cardOfTheMonsterAtPresentListener  = new CardOfTheMonsterAtPresent_Listenner();
            CardOfThePlayAtPresent_Listenner     cardOfThePlayAtPresent_Listener    = new CardOfThePlayAtPresent_Listenner();
            MomentTypeAtPresent_Listenner        momentTypeAtPresent_Listener       = new MomentTypeAtPresent_Listenner();

            CoreDataObserver.GetInstance().AddListenner(momentTypeAtPresent_Listener);
            PlayerDefine player = new PlayerDefine(1, "小磊君");

            CoreDataObserver.GetInstance().SetPlayer(player);//初始化玩家;
            EventTable.GetInstance().RegisterEventType("GetACardOfKickTheDoor", EventType.GetACardOfKickTheDoor);
            EventTable.GetInstance().RegisterEventType("PushAttackEnemyCards", EventType.PushAttackEnemyCards);
            EventTable.GetInstance().RegisterEventType("Magic_CreatEvent", EventType.Magic_CreatEvent);
            EventTable.GetInstance().RegisterEventType("Debuff_CreatEventOne", EventType.Debuff_CreatEventOne);
            EventTable.GetInstance().RegisterEventType("GetMonsterCardAndPushItToList", EventType.GetMonsterCardAndPushItToList);
            EventTable.GetInstance().RegisterEventType("SetACardOfKickTheDoor", EventType.SetACardOfKickTheDoor);
            EventTable.GetInstance().RegisterEventType("ChangeMomentType_CombatPhase", EventType.ChangeMomentType_CombatPhase);
            ////---------------------------------------------------------------------------------------------------------
            ////Test:
            EventTable.GetInstance().RegisterEventType("TestOneEvent", EventType.TestOneEvent);
            EventTable.GetInstance().RegisterEventType("TestTwoEvent", EventType.TestTwoEvent);
            EventTable.GetInstance().RegisterEventType("TestThreeEvent", EventType.TestThreeEvent);
            Run();
        }
예제 #2
0
        private TurnToStateType _turnToState; //求助状态;

        //.......
        //----------------------------------------------------------------
        private CoreDataObserver()
        {
            //------------------------------------------------------------
            _listennerList = new List <Base_Listenner>();
            Debug.Log(_listennerList.Count);
            _cardOfKickTheDoorAtPresent = null;
            _cardOfThePlayAtPresent     = null;
            _mySelf                    = null;
            _isYouRound                = false;              //是否为自己回合;
            _attackEnemyCards          = new Queue <Card>(); //对敌人释放的卡片;
            _momentTypeAtPresent       = MomentType.None;    //当前所属的游戏阶段;
            _cardOfTheMonsterAtPresent = new List <Card>();
            //.........
            //.....
            //...

            //------------------------------------------------------------
        }
예제 #3
0
 public void SetPlayer(PlayerDefine player)
 {
     //设置玩家;
     _mySelf = player;
 }