public void OnChangeStateRemotePlayer(GameDefine.StateType stateType)
        {
            if(stateType != GameDefine.StateType.Attack)
            {
                return;
            }

            this.executeOnStartAttack.Execute();
        }
Exemplo n.º 2
0
        public BlankChunk CreateBlankChunk(Chunk linkedChunk, GameDefine.DirectionType linkedDirection, Point chunkIndex)
        {
            var blankChunk = Instantiate(this.blankChunkPrefab);
            blankChunk.Initialize(this, chunkIndex);
            blankChunk.Connect(linkedDirection, linkedChunk);
            blankChunk.transform.position = GetPosition(chunkIndex, Point.Zero);

            return blankChunk;
        }
Exemplo n.º 3
0
 public bool Contains(GameDefine.DirectionType direction)
 {
     switch(direction)
     {
     case GameDefine.DirectionType.Left:
         return this.Left != null;
     case GameDefine.DirectionType.Right:
         return this.Right != null;
     case GameDefine.DirectionType.Top:
         return this.Top != null;
     case GameDefine.DirectionType.Bottom:
         return this.Bottom != null;
     default:
         Assert.IsTrue(false, "不正な値です. direction = " + direction);
         return false;
     }
 }
Exemplo n.º 4
0
 public static GameDefine.DirectionType InverseDirection(GameDefine.DirectionType direction)
 {
     switch(direction)
     {
     case GameDefine.DirectionType.Left:
         return GameDefine.DirectionType.Right;
     case GameDefine.DirectionType.Right:
         return GameDefine.DirectionType.Left;
     case GameDefine.DirectionType.Top:
         return GameDefine.DirectionType.Bottom;
     case GameDefine.DirectionType.Bottom:
         return GameDefine.DirectionType.Top;
     default:
         Assert.IsTrue(false, "不正な値です. direction = " + direction);
         return GameDefine.DirectionType.Left;
     }
 }
Exemplo n.º 5
0
 public void Connect(GameDefine.DirectionType direction, Chunk chunk)
 {
     switch(direction)
     {
     case GameDefine.DirectionType.Left:
         this.Left = chunk;
         break;
     case GameDefine.DirectionType.Right:
         this.Right = chunk;
         break;
     case GameDefine.DirectionType.Top:
         this.Top = chunk;
         break;
     case GameDefine.DirectionType.Bottom:
         this.Bottom = chunk;
         break;
     default:
         Assert.IsTrue(false, "不正な値です. direction = " + direction);
         break;
     }
 }
Exemplo n.º 6
0
 public bool Difference(ChunkDoorway other, GameDefine.DirectionType type)
 {
     return this.CanCreate(type) != other.CanCreate(type);
 }
Exemplo n.º 7
0
 public bool CanCreate(GameDefine.DirectionType type)
 {
     return (flag & type) > 0;
 }
Exemplo n.º 8
0
 public bool CanCreate(GameDefine.DirectionType direction)
 {
     return (this.flag & direction) > 0;
 }
Exemplo n.º 9
0
 //        void OnDrawGizmos()
 //        {
 //            Gizmos.color = Color.yellow;
 //            var chunkSize = StageManager.ChunkSize;
 //            for(int i=0; i<chunkSize; i++)
 //            {
 //                Gizmos.DrawWireCube((this.index * chunkSize) + new Vector3(chunkSize / 2, chunkSize / 2), new Vector3(chunkSize, chunkSize, 0.0f));
 //            }
 //        }
 public virtual void Connect(GameDefine.DirectionType direction, Chunk chunk)
 {
     this.node.Connect(direction, chunk);
 }
 public void OnChangeStateRemotePlayer(GameDefine.StateType stateType)
 {
     this.playerStateSwitcher.Change(stateType);
 }
        private void ChangeState(GameDefine.StateType newStateType)
        {
            if(this.currentStateType == newStateType)
            {
                return;
            }

            this.stateSwitcher.Change(newStateType);
            this.currentStateType = newStateType;
        }
Exemplo n.º 12
0
 public void Change(GameDefine.StateType stateType)
 {
     this.refStateManager.Change(this.stateObjects[(int)stateType]);
 }
Exemplo n.º 13
0
 public override void Connect(GameDefine.DirectionType direction, Chunk chunk)
 {
     base.Connect (direction, chunk);
     this.linkedChunk = chunk;
     this.linkedDirection = direction;
 }