Beispiel #1
0
        public void RegisterBody()
        {
            if (!SnakeBodyManager.Instance.Bodies.Contains(this))
            {
                SnakeBodyManager.Instance.Bodies.Add(this);

                // recursive: repeat the same process until you reach the head
                if (Front != null)
                {
                    Front.RegisterBody();
                    ScaleDown();
                }
            }
        }