コード例 #1
0
ファイル: Terrains.cs プロジェクト: GameManagers/Run_Chain
    // 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);
    }
コード例 #2
0
 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();
 }
コード例 #3
0
    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;
        }
    }