Пример #1
0
        public static void SpawnPudge(Vector2 p)
        {
            Pudge pudge = new Pudge()
            {
                Position   = p - new Vector2(12, 12),
                MyCollider = new Collider(p, 24, 24)
            };

            EntityManager.Instance.Entities.Add(pudge);
        }
Пример #2
0
        public static void CreateEntity(EntityType entity, Vector2 position)
        {
            switch (entity)
            {
            case EntityType.Customer:
                Customer.SpawnCustomer(position);
                break;

            case EntityType.Worker:
                Worker.SpawnWorker(position);
                break;

            case EntityType.Pudge:
                Pudge.SpawnPudge(position);
                break;
            }
        }