Esempio n. 1
0
        public virtual void Move(Vector3 delta)
        {
            map.RemoveFromPartitioning(this);

            if (currentBush != null)
            {
                team.LeaveBush(currentBush.ID);
            }
            position += delta;

            if (map.InCollision(position))
            {
                position -= delta;
            }

            currentBush = map.GetBushAt(position);
            if (currentBush != null)
            {
                team.EnterBush(currentBush.ID);
            }

            map.AddToPartitioning(this);
        }