Beispiel #1
0
    void Update()
    {
        if (health < 0)
        {
            // Add the # points to the *other* team
            PlayerScores.AddTeamScore(1 - team, pointsValue);

            if (GetComponent <PlayerTankForceMovement>() != null)
            {
                // Treat the player specially... since things can get a bit awkward otherwise

                // Any respawn / reassignment logic would need to happen here;
                GetComponent <PlayerRespawner>().enabled = true;

                health = 100; // So that the player doesn't keep adding score.

                CameraFollowPlayer cam = CameraFollowPlayer.GetCameraForPlayer(GetComponent <PlayerTankForceMovement>());
                if (cam == null)
                {
                    Debug.Log("Couldn't find camera for the player... awkward.");
                }                                                                                  // TIDYME: 2018-07-07 Use assertion
                cam.GetComponent <PlayerDeathCamera>().enabled = true;
            }
            else
            {
                // // added explosion effect
                // if (this.tag == "Tank") {
                //     var explosion : GameObject = Instantiate(Resources.Load("Explosion"), transform.position, transform.rotation);
                // }
                // var explosion : GameObject = Instantiate(Resources.Load("Explosion"), transform.position, transform.rotation) as GameObject;
                Destroy(gameObject);
            }
        }
    }
 void Start()
 {
     // TODO: Change the respawn point based on where in the level they are
     gameController = GameObject.Find("Game Controller").GetComponent <GameController>();
     camFollow      = Camera.main.GetComponent <CameraFollowPlayer>();
     spawnPoint     = transform.position;
 }
Beispiel #3
0
    void Start()
    {
        if (PlayerPrefs.GetFloat(FIRST_START) == 0)
        {
            PlayerPrefs.SetFloat(MASTER_VOL, 1);
            PlayerPrefs.SetFloat(GAME_VOL, 1);
            PlayerPrefs.SetFloat(UI_VOL, 1);
            PlayerPrefs.SetFloat(PROF_VOL, 1);
            PlayerPrefs.SetFloat(BACKGROUND_VOL, 1);
            PlayerPrefs.SetFloat(FIRST_START, 1);
        }
        else
        {
            SetBackgroundSoundLevel(PlayerPrefs.GetFloat(BACKGROUND_VOL));
            sliderBackground.value = PlayerPrefs.GetFloat(BACKGROUND_VOL);
            SetGameSoundLevel(PlayerPrefs.GetFloat(GAME_VOL));
            sliderGame.value = PlayerPrefs.GetFloat(GAME_VOL);
            SetMasterSoundLevel(PlayerPrefs.GetFloat(MASTER_VOL));
            sliderMaster.value = PlayerPrefs.GetFloat(MASTER_VOL);
            SetProfSoundLevel(PlayerPrefs.GetFloat(PROF_VOL));
            sliderProf.value = PlayerPrefs.GetFloat(PROF_VOL);
            SetUiSoundLevel(PlayerPrefs.GetFloat(UI_VOL));
            sliderProf.value = PlayerPrefs.GetFloat(UI_VOL);
        }

        cam = FindObjectOfType <CameraFollowPlayer>();
    }
Beispiel #4
0
    void Update()
    {
        if (landGenerator == null)
        {
            landGenerator = new LandGenerator(config);
        }
        landGenerator.Update();

        if (objectSpawner == null)
        {
            objectSpawner = new ObjectSpawner(config);
        }
        objectSpawner.Update();

        if (playerPhysics == null)
        {
            playerPhysics = new PlayerPhysics(playerObject, config);
        }
        playerPhysics.Update();

        if (cameraFollowPlayer == null)
        {
            cameraFollowPlayer = new CameraFollowPlayer(() => playerObject.transform, () => Camera.main.transform, config);
        }
        cameraFollowPlayer.Update();
    }
    private void Start()
    {
        myTransform          = transform;
        myCameraFollowPlayer = FindObjectOfType <CameraFollowPlayer>();

        GetMouseInput();
    }
Beispiel #6
0
 void Start()
 {
     rBody     = GetComponent <Rigidbody>();
     mainCam   = FindObjectOfType <Camera>();
     camscript = Camera.main.GetComponent <CameraFollowPlayer>();
     audio     = GetComponent <AudioSource>();
     bed       = GameObject.Find("playerbed");
 }
 public void Awake()
 {
     if (button == null)
     {
         button = Resources.Load("Prefabs/UI/TabButton") as GameObject;
     }
     tabs         = new List <InteractionTab>();
     playerCamera = Camera.main.GetComponent <CameraFollowPlayer>();
 }
Beispiel #8
0
    // Use this for initialization
    void Start()
    {
        cameraScript = GetComponentInChildren <CameraFollowPlayer>();
        Debug.Log("CameraPan>>" + cameraScript);
        camHeight = cameraScript.cameraHeight;
        Debug.Log("CameraPan>> camHeight instantiated " + camHeight);
        Bounds b = cameraScript.OrthographicBounds();

        bgDim = cameraScript.GetBackroundDim();
    }
Beispiel #9
0
 // Start is called before the first frame update
 void Awake()
 {
     gameDataLog = FindObjectOfType <GameDataLog>();
     gameDataLog.RefreshRevivePoint();
     vcamRefresh = FindObjectOfType <CameraFollowPlayer>();
     vcamRefresh.FollowPlayer();
     powerUp = FindObjectOfType <PowerUp>();
     if (powerUp = null)
     {
         return;
     }
 }
Beispiel #10
0
    // OnStateExit is called before OnStateExit is called on any state inside this state machine
    override public void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    {
        professorController = GameObject.FindWithTag("Professor").GetComponent <ProfessorController>();
        HotPotatoTimer hotpotatoTimer = FindObjectOfType <HotPotatoTimer>();

        // Init current level controller.
        levelController = LevelController.GetCurrentLevelController();

        if (stateInfo.IsName("Appear") || stateInfo.IsName("AppearBeer") || stateInfo.IsName("AppearBeerGlass") || stateInfo.IsName("AppearAngry") || stateInfo.IsName("AppearMoney"))
        {
            // Activate speech bubble.
            professorController.speechBubble.gameObject.SetActive(true);
            // Show speech bubble.
            professorController.speechBubble.SetVisible(true);
        }
        else if (stateInfo.IsName("Disappear") || stateInfo.IsName("DisappearBeer") || stateInfo.IsName("DisappearBeerGlass") || stateInfo.IsName("DisappearAngry") || stateInfo.IsName("DisappearMoney"))
        {
            professorController.SetVisible(false);
            // Hide professor button.
            ProfessorButton professorButton = FindObjectOfType <ProfessorButton>();
            if (professorButton != null)
            {
                professorButton.SetVisible(true);
            }
            // Deactivate speech bubble.
            professorController.speechBubble.gameObject.SetActive(false);

            // Enable gameplay interaction on current level controller.
            if (levelController != null)
            {
                levelController.SetGameInputEnabled(true);
            }

            // Invoke OnStopDisappear method on level controller.
            if (levelController != null)
            {
                levelController.OnStopProfessorDisappear();
            }

            // when hotpotato is active, resume timer when prof disappears
            if (hotpotatoTimer != null)
            {
                hotpotatoTimer.ResumeTimer();
            }

            //Enable Camera movement when the prof is gone.
            CameraFollowPlayer camera = FindObjectOfType <CameraFollowPlayer>();
            if (camera != null)
            {
                camera.EnableMovement(true);
            }
        }
    }
Beispiel #11
0
 void Start()
 {
     PV = GetComponent <PhotonView>();
     if (!PV.IsMine && PhotonNetwork.IsConnected)
     {
         this.enabled = false;
     }
     comps    = GetComponents <MonoBehaviour>();
     rb       = GetComponent <Rigidbody2D>();
     rs       = GetComponentsInChildren <Renderer>();
     cam      = playerCamera.GetComponent <CameraFollowPlayer>();
     movement = GetComponent <MovementPlayer>();
 }
Beispiel #12
0
    void Start()
    {
        PlayerData = SaveSystem.LoadSaveGame();
        //playerstartpoint = GameObject.Find("PlayerStartPoint").GetComponent<PlayerStartPoint>();
        //FirstFocus = GameObject.Find("FirstFocusCamera").GetComponent<Transform>();

        CameraPlayer = GameObject.Find("Main Camera").GetComponent <CameraFollowPlayer>();

        RootMap     = GameObject.Find("RootMap");
        GameManager = GameManagement.GetInstance();
        //playerstartpoint.SpawnPlayer();
        //player = playerstartpoint.player;
        StartCoroutine(SetupGame());
    }
Beispiel #13
0
    private void LoadLevel()
    {
        if (mainCanvas.GetBlackgroundAlpha() == 1)
        {
            levelGenerator.GenerateFullDungeonLevel(16, 16);
            BakeNavMesh();
            CameraFollowPlayer.InvertCamera();
            PlayerMovement.InvertControls();
            gameController.GetComponents <AudioSource>()[1].Stop();

            camera.GetComponent <PostProcessingBehaviour>().profile = _forestPostProcessing;

            _loadingLevel = false;
        }
    }
Beispiel #14
0
    public void Start()
    {
        _camScript = GameController.camera.GetComponent <CameraFollowPlayer>();

        _originalCamTransform = GameController.camera.transform.rotation;
        _originalCamOffset    = _camScript.Offset;

        _camScript.Target         = _cameraPoints[0];
        _camScript.TargetRotation = _cameraPoints[0].rotation;

        _camScript.Offset = Vector3.zero;

        _skillsAndConsumables.SetActive(false);
        _objectiveText.SetActive(false);
    }
Beispiel #15
0
    private void LoadHub()
    {
        if (mainCanvas.GetBlackgroundAlpha() == 1)
        {
            TeleportPlayerToHub();
            CameraFollowPlayer.InvertCamera();
            PlayerMovement.InvertControls();
            gameController.GetComponents <AudioSource>()[0].Stop();
            player.GetComponent <PlayerMovement>().rotation = new Vector3(0, 0, 0);

            camera.GetComponent <PostProcessingBehaviour>().profile = _townPostProcessing;

            _loadingHub = false;
        }
    }
Beispiel #16
0
    public void TakeDamage(float damage)
    {
        float dmgTaken = Mathf.RoundToInt(damage / _damageResistance);

        //Subtract damage from current health
        _currentHealth -= dmgTaken;

        //Camera shake
        CameraFollowPlayer.cameraShake(1 + ((dmgTaken / 100) * 2), 750);

        //Display damage number
        GameController.damageNumbersCanvas.DisplayDamageNumber(true, dmgTaken, new Vector3(transform.position.x, transform.position.y + _collider.bounds.extents.y, transform.position.z));

        //Play sound
        GetComponent <SoundPlayer>().PlayRandomAudioClip(10, 14);
    }
Beispiel #17
0
    private void Start()
    {
        pic = this.GetComponent <SpriteRenderer>();
        cameraController = GameObject.FindObjectOfType <CameraFollowPlayer>();
        foreach (GameObject gameObject in objectsToTrigger)
        {
            gameObject.SendMessage("SwitchRegister");
            if (gameObject.GetComponent <Door>())
            {
                pic.color = gameObject.GetComponent <Door>().color;
            }
        }

        light.enabled = flipLight ? true : false;
        pic.sprite    = deactivated;
    }
Beispiel #18
0
    // OnStateEnter is called before OnStateEnter is called on any state inside this state machine
    override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    {
        // Init current level controller.
        levelController = LevelController.GetCurrentLevelController();

        if (stateInfo.IsName("Walk"))
        {
            levelController.OnStartPlayerWalking();
            //disable movement of the cam when the prof is visible
            CameraFollowPlayer camera = FindObjectOfType <CameraFollowPlayer>();
            if (camera != null)
            {
                camera.EnableMovement(false);
            }
        }
        if (stateInfo.IsName("Jump"))
        {
            MovementScript ms = FindObjectOfType <MovementScript>();
            if (ms != null)
            {
                ms.StopJumping();
            }
        }
        if (stateInfo.IsName(("Idle")))
        {
            if (levelController != null)
            {
                if (levelController.levelStart)
                {
                    levelController.levelStart = false;
                }
                else
                {
                    levelController.OnEnterPlayerIdle();
                }
            }
        }
        if (stateInfo.IsName("DrinkBeer"))
        {
            FindObjectOfType <PlayerController>().SetDrinking(true);
        }
        if (stateInfo.IsName("ThrowBeer"))
        {
            FindObjectOfType <PlayerController>().StopThrowBeer();
        }
    }
Beispiel #19
0
    // Use this for initialization
    void Start()
    {
        this.rigidbod       = GetComponent <Rigidbody2D>();
        this.boxColliders   = GetComponents <BoxCollider2D>();
        this.sprite         = GetComponent <SpriteRenderer> ();
        this.animController = GetComponent <Animator> ();
        this.inventory      = GetComponent <Inventory>();
        this.camscript      = cam.GetComponent <CameraFollowPlayer>();
        boxColliders[COLLIDER_BODY].name   = "Boby";
        boxColliders[COLLIDER_ATTACK].name = "Attack1";
        colliderParamsNormal = new ColliderParams(boxColliders[COLLIDER_ATTACK].offset.x, boxColliders[COLLIDER_ATTACK].offset.y,
                                                  boxColliders[COLLIDER_ATTACK].size.x, boxColliders[COLLIDER_ATTACK].size.y);
        colliderParamsFinalAttack = new ColliderParams(0.2289857f, 0.4194852f, 0.7408531f, 0.8389704f);

        inventory.AddItem(new Item_Weapon("Shitty sword", 3, 1, 0));
        inventory.AddItem(new Item("Key", 0, 0));
    }
Beispiel #20
0
    // OnStateEnter is called before OnStateEnter is called on any state inside this state machine
    override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    {
        professorController = GameObject.FindWithTag("Professor").GetComponent <ProfessorController>();
        HotPotatoTimer hotpotatoTimer = FindObjectOfType <HotPotatoTimer>();

        // Init current level controller.
        levelController = LevelController.GetCurrentLevelController();

        if (stateInfo.IsName("Appear") || stateInfo.IsName("AppearBeer") || stateInfo.IsName("AppearBeerGlass") || stateInfo.IsName("AppearAngry") || stateInfo.IsName("AppearMoney"))
        {
            professorController.SetVisible(true);
            // Hide professor button.
            ProfessorButton professorButton = FindObjectOfType <ProfessorButton>();
            if (professorButton != null)
            {
                professorButton.SetVisible(false);
            }
            // Disable gameplay interaction on current level controller.
            if (levelController != null)
            {
                levelController.SetGameInputEnabled(false);
            }
            //when hotpotato is the game mode and the prof appears, stop timers
            if (hotpotatoTimer != null)
            {
                hotpotatoTimer.PauseTimer();
                //disable movement of the cam when the prof is visible
                CameraFollowPlayer camera = FindObjectOfType <CameraFollowPlayer>();
                if (camera != null)
                {
                    camera.EnableMovement(false);
                }
            }
        }
        else if (stateInfo.IsName("Disappear") || stateInfo.IsName("DisappearBeer") || stateInfo.IsName("DisappearBeerGlass") || stateInfo.IsName("DisappearAngry") || stateInfo.IsName("DisappearMoney"))
        {
            // Hide speech bubble.
            professorController.speechBubble.SetVisible(false);
        }
        else if (stateInfo.IsName("Money") || stateInfo.IsName("Money2") || stateInfo.IsName("Money3"))
        {
            // Reset money animation flag.
            professorController.Money(false);
        }
    }
Beispiel #21
0
    // Use this for initialization
    void Start()
    {
        player      = GameObject.FindWithTag("Player");
        scoreObject = GameObject.Find("ScoreObject");
        navmesh     = GetComponent <NavMeshAgent>();
        bubblectl   = bubble.GetComponent <SpeechBubbleScript>();
        bubble.gameObject.SetActive(false);
        camscript = Camera.main.GetComponent <CameraFollowPlayer>();
        pc        = player.GetComponent <PlayerController>();
        audio     = GetComponent <AudioSource>();

        sk = scoreObject.GetComponent <ScoreKeeper>();
        rb = GetComponent <Rigidbody>();

        simonGameco = simonGame();
        lookco      = lookAround();
        StartCoroutine(lookco);
    }
Beispiel #22
0
 // Use this for initialization
 void Start()
 {
     maxMoveSpeed      = 250;
     moveSpeed         = maxMoveSpeed;
     zombieTouchCount  = 0;
     zombieSlowRecover = 20;
     deathLimit        = 20;
     attackTime        = 1;
     canIShootYet      = false;
     isDead            = true;
     playerCamera      = (CameraFollowPlayer)Camera.main.GetComponent("CameraFollowPlayer");
     myManager         = (GameManager)GameObject.Find("GameManager").GetComponent("GameManager");
     firstPass         = true;
     wayPointOrder     = transform.position;
     wayPointOrder.y   = 1;
     ammo           = 6;
     wayPointSet    = false;
     Time.timeScale = 0;
     TOME           = false;
 }
Beispiel #23
0
 void Start()
 {
     if (player == null)
     {
         player = FindObjectOfType <PlayerController>();
     }
     if (UISummary == null)
     {
         UISummary = FindObjectOfType <UISummary>().gameObject;
     }
     if (cameraFollowScript == null)
     {
         cameraFollowScript = FindObjectOfType <CameraFollowPlayer>();
     }
     GenerateTrailList();
     CurrentTrailPointIndex = 0;
     TrailPointAchieved(TrailList[0]);
     levelTimer = LevelTimer.Instance;
     levelTimer.Start();
 }
Beispiel #24
0
    // Start is called before the first frame update
    void Start()
    {
        PV = GetComponent <PhotonView>();

        if (cam == null)
        {
            cam = (GameObject.Find("Main Camera").GetComponent <Camera>());
        }

        if (PV == null || PV.IsMine)
        {
            GetComponent <MeshRenderer>().enabled = true;
        }
        targetRotation = transform.rotation;
        rb             = GetComponent <Rigidbody>();

        forwardInput = 0;
        sideInput    = 0;
        camScript    = cam.GetComponent <CameraFollowPlayer>();
    }
Beispiel #25
0
 private void NewScene() //callable without needed to use scene parameter
 {
     floorInfo    = FloorInfo.Instance;
     floorID      = floorInfo.GetFloorID();
     roomShapes   = floorInfo.GetRooms();
     floorLayouts = floorInfo.GetLayouts();
     doors        = floorInfo.GetDoors();
     floorLayouts.LoadLayouts();
     cameraFollowPlayer = Camera.main.GetComponent <CameraFollowPlayer>();
     normalLayouts      = floorLayouts.normalLayouts;
     largeLayouts       = floorLayouts.largeLayouts;
     itemLayouts        = floorLayouts.itemLayouts;
     bossLayouts        = floorLayouts.bossLayouts;
     emptyLayout        = floorLayouts.emptyLayout;
     roomArrSize        = roomShapes.Length;
     rooms.Clear();
     roomCount  = 0;
     beatNumber = 0;
     layouts    = new GameObject[][] { normalLayouts, largeLayouts };
     Invoke("GetMaxDistance", 0.5f);
 }
Beispiel #26
0
    // Use this for initialization
    void Start()
    {
        startSize = menuStart.transform.localScale.x;
        maxSize   = startSize + 0.2f;
        tempVec   = new Vector3(0, 0, 0);
        tempColor = new Color(1, 1, 1, 1);
        listOfShrinking.Add(menuStart);
        listOfShrinking.Add(menuSound);
        listOfShrinking.Add(menuMusic);
        listOfShrinking.Add(menuCredits);
        listOfShrinking.Add(menuHelp);
        listOfShrinking.Add(menu2P);
        menuSoundSprite    = menuSound.GetComponent <SpriteRenderer>().sprite;
        menuSoundNonSprite = menuSoundNon.GetComponent <SpriteRenderer>().sprite;
        menuMusicSprite    = menuMusic.GetComponent <SpriteRenderer>().sprite;
        menuMusicNonSprite = menuMusicNon.GetComponent <SpriteRenderer>().sprite;

        cameraScript = cameraObj.GetComponent <CameraFollowPlayer>();

        P1Control = player1.GetComponent <PlayerController>();
    }
Beispiel #27
0
    //OnStateExit is called before OnStateExit is called on any state inside this state machine
    override public void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    {
        // Init current level controller.
        levelController = LevelController.GetCurrentLevelController();

        if (stateInfo.IsName("Walk"))
        {
            levelController.OnStopPlayerWalking();
            // Disable movement of the cam when the prof is visible.
            CameraFollowPlayer  camera = FindObjectOfType <CameraFollowPlayer>();
            ProfessorController professorController = FindObjectOfType <ProfessorController>();
            if (camera != null /*&& !professorController.IsVisible()*/)
            {
                camera.EnableMovement(true);
            }
        }

        if (stateInfo.IsName("DrinkBeer"))
        {
            levelController.OnStopPlayerDrink();
        }
    }
Beispiel #28
0
    void Start()
    {
        //m_ActiveViking = GetComponent<ICharacter>();

        m_MainCamera   = Camera.main;
        m_CameraFollow = m_MainCamera.GetComponent <CameraFollowPlayer>();

        // TODO: There will be a bug here, if there is more than one canvas in the scene!
        m_SelectedViking = GameObject.Find("Canvas").GetComponentInChildren <SelectedViking>();

        m_Olaf   = GameObject.Find("Olaf").GetComponent <Transform>();
        m_Eric   = GameObject.Find("Eric").GetComponent <Transform>();
        m_Baelog = GameObject.Find("Baelog").GetComponent <Transform>();


        if (m_CameraFollow)
        {
            //Debug.Log("Setting default viking to Olaf");
            switch (defaultActiveViking)
            {
            case ActiveViking.Olaf:
                m_CameraFollow.ActiveViking = m_Olaf;
                m_ActiveViking = m_Olaf.GetComponent <Vkng>();
                break;

            case ActiveViking.Eric:
                m_CameraFollow.ActiveViking = m_Eric;
                m_ActiveViking = m_Eric.GetComponent <Vkng>();
                break;

            case ActiveViking.Baelog:
                m_CameraFollow.ActiveViking = m_Baelog;
                m_ActiveViking = m_Baelog.GetComponent <Vkng>();
                break;
            }
        }
    }
 private void Awake()
 {
     zombieMovement = GameObject.FindObjectOfType <ZombieMovement>();
     ghostMovement  = GameObject.FindObjectOfType <GhostMovement>();
     camera         = GameObject.FindObjectOfType <CameraFollowPlayer>();
 }
Beispiel #30
0
    // Update is called once per frame
    void Update()
    {
        if (hasAuthority == false)
        {
            return;
        }

        if (cam == null)
        {
            cam = FindObjectOfType <CameraFollowPlayer>();
            cam.playerTransform = this.gameObject.transform;
            cam.global          = global;
        }

        if (global.playerTurn == this.playerId)
        {
            myTurn = true;
            if (!global.isMoving && !global.isBackward && !diceController.isShake)
            {
                diceController.TurnOnShakeButton();
            }
            else
            {
                diceController.TurnOffShakeButton();
            }
        }
        else
        {
            myTurn = false;
            diceController.TurnOffShakeButton();
        }

        if (global.isWin)
        {
            Debug.Log("Player turn : " + global.playerTurn + ",Player ID : " + this.playerId);
            if (global.playerTurn == this.playerId)
            {
                GetComponent <PlayerAnimationController>().Win();
                if (!global.isFinish)
                {
                    //Instantiate(winPanel);
                    GameObject go = GameObject.FindGameObjectWithTag("WinPanel");
                    for (int i = 0; i < go.transform.childCount; i++)
                    {
                        go.transform.GetChild(i).gameObject.SetActive(true);
                    }
                    global.isFinish = true;
                }
            }
            else
            {
                GetComponent <PlayerAnimationController>().Lose();
                if (!global.isFinish)
                {
                    //Instantiate(losePanel);
                    GameObject go = GameObject.FindGameObjectWithTag("LosePanel");
                    for (int i = 0; i < go.transform.childCount; i++)
                    {
                        go.transform.GetChild(i).gameObject.SetActive(true);
                    }
                    global.isFinish = true;
                }
            }

            TurnOff();
        }

        //movePlayer();
    }
Beispiel #31
0
 public void setCameraFollowPlayer(CameraFollowPlayer i)
 {
     cameraFollowPlayer = i;
 }
Beispiel #32
0
	void Start()
	{
		m_cam = Camera.main.GetComponent<CameraFollowPlayer>();
		m_temple = GameObject.FindObjectOfType<Temple>();
	}
Beispiel #33
0
 // Use this for initialization
 void Start()
 {
     maxMoveSpeed = 250;
     moveSpeed = maxMoveSpeed;
     zombieTouchCount = 0;
     zombieSlowRecover = 20;
     deathLimit = 20;
     attackTime = 1;
     canIShootYet = false;
     isDead = true;
     playerCamera = (CameraFollowPlayer)Camera.main.GetComponent("CameraFollowPlayer");
     myManager = (GameManager)GameObject.Find ("GameManager").GetComponent("GameManager");
     firstPass = true;
     wayPointOrder = transform.position;
     wayPointOrder.y = 1;
     ammo = 6;
     wayPointSet = false;
     Time.timeScale = 0;
     TOME=false;
 }