public void AddExp(int expIncrease)
 {
     exp += expIncrease;
     if (exp > level * 10)
     {
         SCR_GameManager.LevelUp();
     }
 }
    // OnStateEnter is called when a transition starts and the state machine starts to evaluate this state
    override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    {
        managerReference = GameObject.FindGameObjectWithTag("Manager");
        gameManager      = managerReference.GetComponent <SCR_GameManager>();
        movementScript   = animator.GetComponent <SCR_PinkyAndInky>();

        movementScript.PinkyAndInkyStart();
    }
 public void Start()
 {
     if (SCR_GameManager.instance != null)
     {
         Destroy(this.gameObject);
     }
     DontDestroyOnLoad(this);
     instance = this;
 }
Example #4
0
 private void Start()
 {
     if (danceMeter == null)
     {
         danceMeter = FindObjectOfType <Slider>();
     }
     gameManager     = FindObjectOfType <SCR_GameManager>();
     keysManager     = FindObjectOfType <STD_Keys>();
     danceMeterValue = 0.2f;
 }
 public void Update()
 {
     Movement();
     Rotate();
     if (Input.GetKeyDown(KeyCode.Space))
     {
         weapon.Fire(this.gameObject);
     }
     SCR_GameManager.HealthChange(health);
     SCR_GameManager.HealthMaxChange(maxHealth);
 }
 void Awake()
 {
     if (Manager == null)
     {
         DontDestroyOnLoad(gameObject);
         Manager = this;
     }
     else if (Manager != this)
     {
         // Manager.Start();
         Destroy(gameObject);
     }
 }
Example #7
0
 private void Start()
 {
     controller    = gameObject.AddComponent <CharacterController>();
     gameManager   = gameManager.gameObject.GetComponent <SCR_GameManager>();
     spawnLocation = GetComponent <Transform>();
 }
Example #8
0
 // OnStateEnter is called when a transition starts and the state machine starts to evaluate this state
 override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
 {
     scatterScript    = animator.GetComponent <SCR_Scatter>();
     managerReference = GameObject.FindGameObjectWithTag("Manager");
     gameManager      = managerReference.GetComponent <SCR_GameManager>();
 }
 // Start is called before the first frame update
 void Start()
 {
     instance = this;
 }
 public void ChangeMaxHealth(int change)
 {
     maxHealth += change;
     SCR_GameManager.HealthMaxChange(maxHealth);
 }
 public override void RemoveHealth(int damage)
 {
     base.RemoveHealth(damage);
     SCR_GameManager.HealthChange(health);
 }
 public override void AddHealth(int heal)
 {
     base.AddHealth(heal);
     SCR_GameManager.HealthChange(health);
 }