Ejemplo n.º 1
0
    // Start is called before the first frame update
    void Start()
    {
        GameObject[] results = GameObject.FindGameObjectsWithTag("Stats");
        for (int i = 0; i < results.Length; ++i)
        {
            if (results[i].GetComponent <Stats>() != null)
            {
                upgradedStats = results[i];
                break;
            }
        }

        weapon      = allWeapons[weaponIndex];
        playerAudio = GameObject.Find("Player").GetComponent <AudioSource>();
        weaponSlots = GameObject.Find("Weapon Wheel").GetComponent <WeaponWheel>();

        lightAttack = true;
        heavyAttack = false;

        lightSpecialCircle = GameObject.Find("Light Special Circle").GetComponent <Image>();
        heavySpecialCircle = GameObject.Find("Heavy Special Circle").GetComponent <Image>();
        rangeSpecialCircle = GameObject.Find("Range Special Circle").GetComponent <Image>();

        CircleSlash            = GameObject.Find("CircleSlash").GetComponent <Image>();
        CircleSlash.fillAmount = 0;

        lightSpecialCircle.fillAmount = 0;
        heavySpecialCircle.fillAmount = 0;
        rangeSpecialCircle.fillAmount = 0;

        specialAttackIsQueued = false;
        specialAttackTimer    = Time.time;
    }
Ejemplo n.º 2
0
 void Start()
 {
     attackDamage       = lightAttackDamage;
     currentAttack      = 0;
     attackBox          = lightAttackBox;
     weaponSlots        = GameObject.Find("Weapon Wheel").GetComponent <WeaponWheel>();
     playerCombatNoises = gameObject.GetComponent <AudioSource>();
 }
Ejemplo n.º 3
0
 private void Awake()
 {
     // Assign to components
     characterController = GetComponent <CharacterController>();
     OriginalHeight      = characterController.height;
     bulletPistol        = GetComponent <BulletPistol>();
     //gunAS = GetComponent<AudioSource>();
     animator    = GetComponent <Animator>();
     weaponWheel = GetComponent <WeaponWheel>();
 }
Ejemplo n.º 4
0
 public void Start()
 {
     rb          = GetComponent <Rigidbody>();
     playerMove  = GetComponent <PlayerMove>();
     weaponWheel = GetComponent <WeaponWheel>();
 }
 void DeactivateSwitch()
 {
     Time.timeScale = 1;
     WeaponWheel.SetActive(false);
 }
 void ActivateSwitch()
 {
     Time.timeScale = 0.01f;
     WeaponWheel.SetActive(true);
 }