// Use this for initialization void Awake() { forestCount = terrains.Length; PastTerrains past = new PastTerrains(forestCount, terrains); RunFacade.getInstance.InitGameObject(this.gameObject); RunFacade.getInstance.sendNotificationCommand(NotificationConstant.TerrainCommand.SetMapBasic, past); }
public void SetMapBasic(PastTerrains recive) //ok { Data.TerrainCount = recive.TerrainCount; Data.Terrains = recive.terrains; Data.maps = Read.Instance.ReadMap(); Data.JinbiStrings = Read.Instance.ReadJinbi(); Data.enemys = Read.Instance.ReadEnemy(); }
public override void Execute(PureMVC.Interfaces.INotification notification) { TerrainProxy proxy = (TerrainProxy)Facade.RetrieveProxy("TerrainProxy"); //通过名字获取Proxy switch (notification.Name) { case NotificationConstant.TerrainCommand.SetMapBasic: { PastTerrains past = notification.Body as PastTerrains; proxy.SetMapBasic(past); } break; //case NotificationConstant.TerrainCommand.InitMap: //{ // proxy.InitMap(); //}break; case NotificationConstant.TerrainCommand.UpdateMap: { PastSingle past = notification.Body as PastSingle; proxy.UpdateMap(past); } break; } }