public void OnChangeStateRemotePlayer(GameDefine.StateType stateType) { if(stateType != GameDefine.StateType.Attack) { return; } this.executeOnStartAttack.Execute(); }
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; }
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; } }
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; } }
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; } }
public bool Difference(ChunkDoorway other, GameDefine.DirectionType type) { return this.CanCreate(type) != other.CanCreate(type); }
public bool CanCreate(GameDefine.DirectionType type) { return (flag & type) > 0; }
public bool CanCreate(GameDefine.DirectionType direction) { return (this.flag & direction) > 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; }
public void Change(GameDefine.StateType stateType) { this.refStateManager.Change(this.stateObjects[(int)stateType]); }
public override void Connect(GameDefine.DirectionType direction, Chunk chunk) { base.Connect (direction, chunk); this.linkedChunk = chunk; this.linkedDirection = direction; }