void Awake() { timer = FindObjectOfType <Timer>(); enemyAI = FindObjectsOfType <EnemyAI>(); hitBoxes = GetComponent <PlayerAttack> (); currentHealth = MaxHealth; playerFever = GetComponent <PlayerAttack>(); comboUI = GetComponent <ComboCounter> (); consuming = GetComponent <PlayerConsume> (); skillScript = GetComponent <PlayerSkill>(); controllerScript = GetComponent <PlayerController>(); animator = GetComponent <Animator>(); }
// Start is called before the first frame update void Start() { if (Instance != null && Instance != this) { Destroy(gameObject); } else { Instance = this; } pwc = GetComponent <PlayerWeaponController>(); pc = GetComponent <PlayerConsume>(); GiveItem("spear"); GiveItem("potion_test"); }
float skillsTimer = 0.0f; // A skillsTimer variable is shared between the three skills. void Start() { sfx = FindObjectOfType <Sounds>(); bossChargeHittable = true; anim = GetComponent <Animator>(); attackScript = GetComponent <PlayerAttack>(); comboScript = GetComponent <ComboCounter>(); healthScript = GetComponent <PlayerHealth>(); consumeScript = GetComponent <PlayerConsume>(); controllerScript = GetComponent <PlayerController>(); GameObject iconsHolder = GameObject.Find("HUDCanvas/AbilityIcons"); chargeIcon = iconsHolder.transform.GetChild(0).GetComponent <IconCoolDown>(); dodgeIcon = iconsHolder.transform.GetChild(1).GetComponent <IconCoolDown>(); tornadoIcon = iconsHolder.transform.GetChild(3).GetComponent <IconCoolDown>(); rb = GetComponent <Rigidbody2D>(); }
// Use this for initialization void Start() { isUppercut = false; playerController = GetComponent <PlayerController>(); originalChainDelay = chainDelay; originalAttackDelay = attackDelay; originalCharged = charged; //gameController = FindObjectOfType<GameController>(); RightCharging = false; attacking = false; isRight = true; comboUI = GetComponent <ComboCounter>(); anim = GetComponent <Animator>(); anim.Play("Player_Idle"); // ComboCounter = 0; canAttack = true; //SetCountText(); RightHitbox1.SetActive(false); RightHitbox2.SetActive(false); RightHitbox3.SetActive(false); RightChargebox.SetActive(false); playerHealth = GetComponent <PlayerHealth>(); playerConsume = GetComponent <PlayerConsume>(); }