Esempio n. 1
0
 protected override void SetDataOnPhoton(int _playerId, BuildingType _type)
 {
     this.playerId = _playerId;
     if (_playerId != DefaultManager.GameController.Instance.PlayerId)
     {
         this.buildingManager = DefaultManager.GameController.Instance.GetPlayer(this.playerId).BuildingManager;
         this.pieceManager    = DefaultManager.GameController.Instance.GetPlayer(this.playerId).PieceManager;
         this.buildingManager.AddUnit(this);
         this.transform.parent = this.buildingManager.transform;
     }
     this.status = this.buildingManager.UnitInfoDictionary[_type];
     this.spriteRenderer.sprite = Pattern.Factory.SpriteFactory.Instance.GetSprite("PiecesAtlas", string.Format(buildingManager.UnitSpriteNames[this.playerId], this.status.name));
     MiniUnitManager.Instance.CreateMiniUnit(this);
 }
Esempio n. 2
0
 internal void SetBuildingManager(BuildingManager _buildingManager)
 {
     this.buildingManager = _buildingManager;
 }