Exemplo n.º 1
0
 void Start()
 {
     if (tag != "Decoy")
     {
         //        player = GameObject.FindGameObjectWithTag("Player");
         anim          = gameObject.GetComponent <Animator>();
         heroEquipment = gameObject.GetComponent <PlayerEquipment>();
         controller    = gameObject.GetComponent <CharacterController>();
         heroCooldowns = gameObject.GetComponent <PlayerCooldowns>();
         //rb2d = GetComponent<Rigidbody2D>();
     }
     else
     {
         heroEquipment = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerEquipment>();
     }
     fullSpeed      = 3.1f;
     halfSpeed      = 1.6f;
     knockbackTimer = 0;
     stunned        = false;
     sTimerMax      = .5f;
     stunTimer      = sTimerMax;
     if (GameObject.FindGameObjectWithTag("Dungeon"))
     {
         generator = GameObject.FindGameObjectWithTag("Dungeon").GetComponent <RoomGeneration>();
     }
 }
Exemplo n.º 2
0
 void Awake()
 {
     player     = GetComponent <PlayerController>();
     state      = new IdleState(player);
     stateTimer = GetComponent <StateTimer>();
     cooldowns  = GetComponent <PlayerCooldowns>();
 }
 // Use this for initialization
 void Start()
 {
     CheckCDTimer       = 0;
     currentScaleSpell  = 0;
     currentScaleBoot   = 0;
     currentScaleAbsorb = 0;
     theCooldowns       = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerCooldowns>();
 }
Exemplo n.º 4
0
 void Start()
 {
     player        = GameObject.FindGameObjectWithTag("Player");
     heroEquipment = player.GetComponent <PlayerEquipment>();
     heroCds       = player.GetComponent <PlayerCooldowns>();
     controller    = GetComponent <CharacterController>();
     timerMax      = knockbackDistance / knockbackSpeed;
     timerCurr     = timerMax;
     once          = true;
     wasMeleeing   = false;
 }
 void Start()
 {
     player = GameObject.FindGameObjectWithTag("Player");
     if (player != null)
     {
         cooldowns = player.GetComponent <PlayerCooldowns>();
         melee     = player.GetComponentInChildren <PlayerMeleeAttack>();
         anim      = player.GetComponent <Animator>();
         move      = player.GetComponent <PlayerMovement>();
     }
 }
 void Start()
 {
     anim          = gameObject.GetComponent <Animator>();
     heroEquipment = gameObject.GetComponent <PlayerEquipment>();
     heroCooldowns = gameObject.GetComponent <PlayerCooldowns>();
     heroLight     = gameObject.GetComponent <PlayerLight>();
     UICD          = GameObject.Find("Health bar").GetComponent <HUDCooldowns>();
     playersLight  = gameObject.GetComponentInChildren <Light>();
     audioPlayer   = gameObject.GetComponent <AudioSource>();
     chained       = false;
     shoot         = false;
     shootTimer    = 0;
 }
 void Start()
 {
     earthtrailtime       = 0;
     anim                 = gameObject.GetComponent <Animator>();
     controller           = gameObject.GetComponent <CharacterController>();
     heroEquipment        = gameObject.GetComponent <PlayerEquipment>();
     heroLight            = gameObject.GetComponent <PlayerLight>();
     heroCooldowns        = gameObject.GetComponent <PlayerCooldowns>();
     trailBlazerDropTimer = 0.0f;
     UICD                 = GameObject.Find("Health bar").GetComponent <HUDCooldowns>();
     aPlayer              = gameObject.GetComponent <AudioSource>();
     once                 = false;
     theoptions           = GameObject.Find("TheOptions").GetComponent <Options>();
     move                 = GetComponent <PlayerMovement>();
 }
 void Start()
 {
     UICD          = GameObject.Find("Health bar").GetComponent <HUDCooldowns>();
     heroCooldowns = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerCooldowns>();
 }