コード例 #1
0
        public void SetShipDrawType(FleetType iFleet, ShipDrawType iDrawType)
        {
            switch (iFleet)
            {
            case FleetType.Friend:
                _dicFriendBattleShips.ForEach(delegate(KeyValuePair <int, UIBattleShip> x)
                {
                    if (x.Value != null)
                    {
                        x.Value.drawType = iDrawType;
                    }
                });
                break;

            case FleetType.Enemy:
                _dicEnemyBattleShips.ForEach(delegate(KeyValuePair <int, UIBattleShip> x)
                {
                    if (x.Value != null)
                    {
                        x.Value.drawType = iDrawType;
                    }
                });
                break;
            }
        }
コード例 #2
0
 private bool Init()
 {
     if (_uiBillboard == null)
     {
         _uiBillboard = GetComponent <BillboardObject>();
     }
     _uiBillboard.isBillboard = true;
     if (_traPog == null)
     {
         Util.FindParentToChild(ref _traPog, base.transform, "POG");
     }
     if (_traSPPog == null)
     {
         Util.FindParentToChild(ref _traSPPog, base.transform, "SPPog");
     }
     if (_traTorpedoAnchor == null)
     {
         Util.FindParentToChild(ref _traTorpedoAnchor, base.transform, "TorpedoAnchor");
     }
     if (_clsObject3D == null)
     {
         Util.FindParentToChild(ref _clsObject3D, base.transform, "ShipAnchor/Object3D");
     }
     if ((UnityEngine.Object)_animShipAnimation == null)
     {
         _animShipAnimation = GetComponent <Animation>();
     }
     _animShipAnimation.playAutomatically = false;
     _animShipAnimation.Stop();
     _iStandingPositionType = StandingPositionType.Free;
     _dicStandingPos        = new Dictionary <StandingPositionType, Vector3>();
     _iShipDrawType         = ShipDrawType.Normal;
     return(true);
 }
コード例 #3
0
 private bool Init()
 {
     if (this._uiBillboard == null)
     {
         this._uiBillboard = base.GetComponent <BillboardObject>();
     }
     this._uiBillboard.isBillboard = true;
     if (this._traPog == null)
     {
         Util.FindParentToChild <Transform>(ref this._traPog, base.get_transform(), "POG");
     }
     if (this._traSPPog == null)
     {
         Util.FindParentToChild <Transform>(ref this._traSPPog, base.get_transform(), "SPPog");
     }
     if (this._traTorpedoAnchor == null)
     {
         Util.FindParentToChild <Transform>(ref this._traTorpedoAnchor, base.get_transform(), "TorpedoAnchor");
     }
     if (this._clsObject3D == null)
     {
         Util.FindParentToChild <Object3D>(ref this._clsObject3D, base.get_transform(), "ShipAnchor/Object3D");
     }
     if (this._animShipAnimation == null)
     {
         this._animShipAnimation = base.GetComponent <Animation>();
     }
     this._animShipAnimation.set_playAutomatically(false);
     this._animShipAnimation.Stop();
     this._iStandingPositionType = StandingPositionType.Free;
     this._dicStandingPos        = new Dictionary <StandingPositionType, Vector3>();
     this._iShipDrawType         = ShipDrawType.Normal;
     return(true);
 }
コード例 #4
0
 public void SetShipDrawType(ShipDrawType iType)
 {
     SetShipDrawType(FleetType.Friend, iType);
     SetShipDrawType(FleetType.Enemy, iType);
 }