コード例 #1
0
    public override void Execute(PureMVC.Interfaces.INotification notification)
    {
        MonsterProxy proxy = (MonsterProxy)Facade.RetrieveProxy("MonsterProxy");        //通过名字获取Proxy

        switch (notification.Name)
        {
        case NotificationConstant.MonsterCommand.SetMonsters: {
            PastMonsters past = notification.Body as PastMonsters;
            proxy.setMonsterBasic(past);
        } break;

        case NotificationConstant.MonsterCommand.MonsterAtk: {
            proxy.atk();
        } break;
        }
    }
コード例 #2
0
 public void setMonsterBasic(PastMonsters recive)
 {
     Data.monsters     = recive.monsters;
     Data.monsterCount = recive.MonsterCount;
 }
コード例 #3
0
ファイル: Monster.cs プロジェクト: GameManagers/Run_Chain
    void Start()
    {
        PastMonsters past = new PastMonsters(monsters.Length, monsters);

        RunFacade.getInstance.sendNotificationCommand(NotificationConstant.MonsterCommand.SetMonsters, past);
    }