Esempio n. 1
0
		public GridData(int index, GRID_TYPE type, Neighbor[] neighbors)
		{
			Index = index;

			GridType = type;

			Neighbors = neighbors;
		}
Esempio n. 2
0
		Value<bool> IPlayer.Move(Neighbor.DIRECTION dir)
		{
			var returnValue = new Value<bool>();

			var result = CheckMove(dir);

			returnValue.SetValue(result);

			return result;
		}
Esempio n. 3
0
		public bool CheckMove(Neighbor.DIRECTION move_direction)
		{
			var user = _Users[_Currect];

			var neighbors = Singleton<Resource>.Instance.FindGridData(user.Position.GridIndex)
												.Neighbors;

			var result = neighbors.Where(neighbor => neighbor.Dir == move_direction)
								.Any(neighbor => neighbor.Index != 0);

			if(result)
			{
				StepCal.Move();
			}

			return result;
		}