public bool isTeleporting = false; // Currently teleporting (to block movement etc) // Use this for initialization void Start() { if ((movementHandler = GetComponent <Player_Movement>()) == null) { Debug.LogError("You need to add a player movement script to this game object"); } if ((animationHandler = GetComponent <Player_Animation_Controller>()) == null) { Debug.LogError("You need to add a player animation handler script to this game object"); } if ((manager = GameObject.FindGameObjectWithTag("GameManager").GetComponent <Game_Manager>()) == null) { Debug.LogError("You're missing a Game Manager with a game manager script in your scene"); } if ((inventoryHandler = GetComponent <Player_Inventory>()) == null) { Debug.LogError("You need to add a player inventory script to this game object"); } if ((GameObject.FindGameObjectWithTag("Hand") == null)) { Debug.LogError("You need to add a hand tag to a part of the player body (weapon pickup)"); } height = GetComponent <MeshRenderer> ().bounds.size.y; state = PLAYER_STATE.ALIVE; transform.position = determineRespawnPos(spawnPos.position, 15); }
// Use this for initialization void Start() { rb = GetComponent <Rigidbody>(); controller = GetComponent <Player_Controller>(); anim = GetComponent <Player_Animation_Controller>(); gm = GameObject.FindGameObjectWithTag("GameManager").GetComponent <Game_Manager>(); targetRotation = transform.rotation; forwardInput = turnInput = 0; }