Пример #1
0
    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;
    }
Пример #2
0
 private IEnumerator waitAction(EntityThing entity)
 {
     yield return new WaitForSeconds(entity._speed);
     entity._action = true;
 }