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; } }
public void setMonsterBasic(PastMonsters recive) { Data.monsters = recive.monsters; Data.monsterCount = recive.MonsterCount; }
void Start() { PastMonsters past = new PastMonsters(monsters.Length, monsters); RunFacade.getInstance.sendNotificationCommand(NotificationConstant.MonsterCommand.SetMonsters, past); }