Beispiel #1
0
        public Player(PlayerNum type = PlayerNum.One)
        {
            batchMan = new SpriteBatchManager(9, 1);
            gameObjMan = new GameObjectManager(11, 1);
            timeMan = new TimeEventManager(4, 2);
            colPairMan = new CollisionPairManager(13, 1);
            hookupManagers();
            initialPlayerSetup();

            playerType = type;
            currNumLives = maxLives;
        }
        public static void initialize(int toCreate, int willCreate)
        {
            Debug.Assert(toCreate > 0);
            Debug.Assert(willCreate > 0);

            if (tMan == null)
            {
                tMan = new TimeEventManager(toCreate, willCreate);
            }
        }
        public static void setInstance(TimeEventManager instance)
        {
            if (tMan != null)
            {
                Instance.prevTime = Instance.currTime;
                instance.CurrentTime = Instance.CurrentTime;
            }

            tMan = instance;
            Instance.updateTime();
        }