// Use this for initialization void Start() { enemyCurrentHealth = enemyMaxHealth; thePlayerStats = FindObjectOfType <PlayerStats>(); thePlayer2Stats = FindObjectOfType <Player2Stats>(); theQM = FindObjectOfType <QuestManager> (); }
public float movementSpeed = 10f; // The fastest the player can travel in the x axis. public void Awake() { if (instance == null) { instance = this; } curHealth = maxHealth; }
// Use this for initialization void Start() { health1Bar.maxValue = player1Health.playerMaxHealth; health2Bar.maxValue = player2Health.playerMaxHealth; if (!UIExist) { UIExist = true; DontDestroyOnLoad(transform.gameObject); } else { Destroy(gameObject); } thePS = GetComponent <PlayerStats>(); thePS2 = GetComponent <Player2Stats>(); }
// Use this for initialization void Start() { stat = FindObjectOfType <Player2Stats>(); anim = GetComponent <Animator>(); mybody = GetComponent <Rigidbody2D>(); if (!playerexist) { playerexist = true; DontDestroyOnLoad(transform.gameObject); } else { Destroy(gameObject); } canMove = true; }
void Start() { stats = Player2Stats.instance; stats.curHealth = stats.maxHealth; if (statusIndicator == null) { Debug.LogError("No status indicator referenced on Player"); } else { statusIndicator.SetHealth(stats.curHealth, stats.maxHealth); } GameMaster.gm.OnToggleUpgradeMenu += OnUpgradeMenuToggle; audioManager = AudioManager.instance; if (audioManager == null) { Debug.LogError("No audiomanager in scene"); } InvokeRepeating("RegenHealth", 1f / stats.regenRate, 1f / stats.regenRate); }
void Start() { stats = PlayerStats.instance; stats2 = Player2Stats.instance; }
// Use this for initialization void Start() { thePS = FindObjectOfType <PlayerStats> (); thePS2 = FindObjectOfType <Player2Stats> (); }
// Use this for initialization void Start() { myBody = GetComponent <Rigidbody2D> (); thePS = FindObjectOfType <PlayerStats> (); thePS2 = FindObjectOfType <Player2Stats> (); }