void Start()
    {
        survivor = GameObject.FindGameObjectWithTag("player");
        survivorManager = survivor.GetComponent<SurvivorManager>();
        playerHealth = survivorManager.PlayerHealth;
        isPlayerDead = survivorManager.IsPlayerDead;
        coolDownTimer = 0;
        damage = -10;

        a = GetComponent<Animation>();
        r = GetComponent<Rigidbody>();
        myTransform = GetComponent<Transform>();

        a.wrapMode = WrapMode.Loop;
    }
Example #2
0
        public void Init(ContentManager content)
        {
            isRunning = false;
            soundMgr = DayGameEngineImp.getGameEngine().getSoundManager();

            uiMgr = new NightUiManagerImpl();
            menuMgr = DayGameEngineImp.getGameEngine().getMenuManager();
            mapMgr = DayGameEngineImp.getGameEngine().getMapManager();
            zombieMgr = new ZombieManagerImplementation();
            effectsMgr = new EffectsManagerImp();
            survivorMgr = new SurvivorManagerIMP();
            nightSimMgr = new NightSimMgrImpl();

            nightSimMgr.init();
            effectsMgr.Init(content);
            //uiMgr.init();
            //menuMgr.Init(content);    // gets init in the daygameengine
            //mapMgr.Init();
            zombieMgr.init(content);
            survivorMgr.init(content);
            nightview = content.Load<Texture2D>("Images//nightclouds");
        }