Beispiel #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;
    }
Beispiel #2
0
 void Start()
 {
     attackDamage       = lightAttackDamage;
     currentAttack      = 0;
     attackBox          = lightAttackBox;
     weaponSlots        = GameObject.Find("Weapon Wheel").GetComponent <WeaponWheel>();
     playerCombatNoises = gameObject.GetComponent <AudioSource>();
 }
Beispiel #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>();
 }
Beispiel #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);
 }