public static bool putCharacter(EntityThing character, Vector3 newPos, Vector3 oldPos) { if (mapArray[(int)newPos.x, (int)newPos.y] == null) { mapArray[(int)newPos.x, (int)newPos.y] = character; mapArray[(int)oldPos.x, (int)oldPos.y] = null; character.gameObject.GetComponent<Rigidbody2D>().MovePosition(newPos); return true; } return false; }
private IEnumerator waitAction(EntityThing entity) { yield return new WaitForSeconds(entity._speed); entity._action = true; }