// Use this for initialization void Start() { this.player = PlayerController.instance; this.rb2d = this.GetComponent<Rigidbody2D> (); this.melee = this.GetComponent<MeleeAttacker> (); this.animator = this.GetComponent<Animator> (); }
// Use this for initialization void Start() { this.player = PlayerController.instance; this.rb2d = this.GetComponent <Rigidbody2D> (); this.melee = this.GetComponent <MeleeAttacker> (); this.animator = this.GetComponent <Animator> (); }
void DoOwie(Collider2D collider) { MeleeAttacker meleeAttacker = this.gameObject.GetComponent <MeleeAttacker> (); if (collider.tag != this.tag) { if (collider.tag == "Player" || collider.tag == "Enemy" || collider.tag == "Animal") { if (collider.tag == "Enemy") { collider.gameObject.GetComponent <EnemyFullAI>().toggleAggro(true); } if (meleeAttacker != null) { if (meleeAttacker.Locked == false) { OnOwie(collider); meleeAttacker.LockAttacker(); } } else { OnOwie(collider); } } } }
protected void Awake() { _mover = gameObject.GetComponent<RigidBodyMover>(); _meleeAttacker = gameObject.GetComponent<MeleeAttacker>(); Enable(); }
protected void Awake() { _mover = gameObject.GetComponent <RigidBodyMover>(); _meleeAttacker = gameObject.GetComponent <MeleeAttacker>(); Enable(); }
private void Start() { walker = gameObject.GetComponent <Walker>(); melee = gameObject.GetComponent <MeleeAttacker>(); mageProjectile = gameObject.GetComponent <Shooter>().projectile; initialVel = walker.velocity; initialDmgMelee = melee.damage; initialDmgMage = mageProjectile.damage; rageState = State.NORMAL; }
// Use this for initialization void Start() { this.rb2d = this.GetComponent <Rigidbody2D> (); this.animator = this.GetComponent <Animator> (); this.meleeAttacker = this.GetComponent <MeleeAttacker> (); this.rangedAttacker = this.GetComponent <RangedAttacker> (); this.toolUser = this.GetComponent <ToolUser> (); StartCoroutine(StartAnimations()); // Give player starting items // this.inventory.Add("sword"); }
// Use this for initialization void Start() { this.rb2d = this.GetComponent <Rigidbody2D> (); this.animator = this.GetComponent <Animator> (); this.meleeAttacker = this.GetComponent <MeleeAttacker> (); this.rangedAttacker = this.GetComponent <RangedAttacker> (); this.toolUser = this.GetComponent <ToolUser> (); this.sword = gameObject.AddComponent <AudioSource> (); this.sword.clip = Resources.Load("Sounds/SwordSwing1") as AudioClip; print(this.sword); // Give player starting items //this.inventory.Add("sword"); }
//private Animator animator; // Use this for initialization private void Start() { cursor = GetComponent <MouseCursor>(); shooter = GetComponent <Shooter>(); if (!shooter) { Debug.Log("Dependence not found: shooter"); } if (!(meleeAttacker = GetComponent <MeleeAttacker>())) { Debug.Log("Dependence not found: meleeAttacker"); } if (!(shield = GetComponent <Shield>())) { Debug.Log("Dependence not found: shield"); } skillHealing = GetComponent <SkillHealing>(); jumper = GetComponent <SkillJumper>(); sounds = GetComponentInChildren <AttackSounds>(); //animator = transform.GetChild(1).GetComponent<Animator>(); cursor.ChangueCursor((int)CurrentMode); }
// Use this for initialization void Start() { this.rb2d = this.GetComponent<Rigidbody2D> (); this.animator = this.GetComponent<Animator> (); this.meleeAttacker = this.GetComponent<MeleeAttacker> (); this.rangedAttacker = this.GetComponent<RangedAttacker> (); this.toolUser = this.GetComponent<ToolUser> (); StartCoroutine (StartAnimations()); // Give player starting items // this.inventory.Add("sword"); }
public void setWeapon(MeleeAttacker meleeWep) { this.meleeWeapon = meleeWep; }
public void setWeapon(MeleeAttacker meleeWep) { this.meleeWeapon = meleeWep; }
// Use this for initialization void Start() { this.rb2d = this.GetComponent<Rigidbody2D> (); this.animator = this.GetComponent<Animator> (); this.meleeAttacker = this.GetComponent<MeleeAttacker> (); this.rangedAttacker = this.GetComponent<RangedAttacker> (); this.toolUser = this.GetComponent<ToolUser> (); this.sword = gameObject.AddComponent<AudioSource> (); this.sword.clip = Resources.Load ("Sounds/SwordSwing1") as AudioClip; print (this.sword); // Give player starting items //this.inventory.Add("sword"); }
private void Start() { attacker = GetComponent <MeleeAttacker>(); }