void Start() { pa = this.GetComponent <PlayerAnimate> (); sc = GameObject.FindGameObjectWithTag("GameController").GetComponent <SpriteContainer> (); oneHandSpawn = GameObject.Find("oneHandSpawn"); bl = GameObject.Find("Bullet").GetComponent <Bullet> (); }
void killPlayer() { if (this.GetComponent <PlayerAnimate> ().enabled == true) { PlayerAnimate pa = this.GetComponent <PlayerAnimate> (); PlayerMovement pm = this.GetComponent <PlayerMovement> (); RotateToCursor rot = this.GetComponent <RotateToCursor> (); WeaponAttack wa = this.GetComponent <WeaponAttack> (); legDir ld = this.GetComponentInChildren <legDir> (); wa.dropWeapon(); pa.legs.sprite = null; pa.legs.enabled = false; ld.enabled = false; pa.torso.sprite = deadSpr; pa.enabled = false; rot.enabled = false; wa.enabled = false; pm.enabled = false; CircleCollider2D col = this.GetComponent <CircleCollider2D> (); col.enabled = false; } }
void revivePlayer() { dead = false; Debug.Log("PlayerHealth - revivePlayer"); PlayerAnimate pa = this.GetComponent <PlayerAnimate> (); PlayerMovement pm = this.GetComponent <PlayerMovement> (); RotateToCursor rot = this.GetComponent <RotateToCursor> (); WeaponAttack wa = this.GetComponent <WeaponAttack> (); dead = false; legDir ld = this.GetComponentInChildren <legDir> (); wa.dropWeapon(); pa.legs.enabled = true; ld.enabled = true; pa.enabled = true; rot.enabled = true; wa.enabled = true; pm.enabled = true; CircleCollider2D col = this.GetComponent <CircleCollider2D> (); col.enabled = true; }
void Start() { Scene currentScene = SceneManager.GetActiveScene(); sceneName = currentScene.name; pa = this.GetComponent <PlayerAnimate> (); sc = GameObject.FindGameObjectWithTag("GameController").GetComponent <SpriteContainer> (); }
private void OnTriggerStay(Collider collider) { if (collider.gameObject == player) { PlayerAnimate playerAnimate = player.GetComponentInChildren <PlayerAnimate>(); if (playerAnimate.Meleeing()) { unconscious = true; } } }
private void buttonPlay_Click(object sender, EventArgs e) { PlayerAnimate.Start(); virusStartScreen.Visible = false; labelTitle.Visible = false; buttonPlay.Visible = false; this.Height = 460; this.Width = 760; int rand1 = rand.Next(30, 730); int rand2 = rand.Next(30, 430); Player.Location = new Point(rand1, rand2); MoveTimer.Start(); }
public void Damage() { _audioSource.Play(); _health--; if (_health <= 0) { _died = true; } PlayerAnimate playerAnimate = this.GetComponent <PlayerAnimate>(); playerAnimate.Damage(); GameManager.instance.CurrentHealth(_health); }
void Start() { originalLightColor = spotlight.color; spotlight.color = Color.yellow; player = GameObject.FindGameObjectWithTag("Player"); navAgent = GetComponent <NavMeshAgent>(); viewAngle = spotlight.spotAngle; firstReturnTimer = returnTimer; crouchables = GameObject.FindGameObjectsWithTag("Crouchable"); playerAnimate = player.GetComponentInChildren <PlayerAnimate>(); anim = GetComponentInChildren <Animator>(); GotoNextPoint(); //SetWaypoints(); }
public void revivePlayer() { PlayerAnimate pa = this.GetComponent <PlayerAnimate>(); playermovement pm = this.GetComponent <playermovement>(); rotateToCursor rot = this.GetComponent <rotateToCursor>(); WeaponAttack wa = this.GetComponent <WeaponAttack>(); LegsDirection legDir = this.GetComponentInChildren <LegsDirection>(); wa.dropWeapon(); pa.legs.enabled = true; legDir.enabled = true; pa.enabled = true; rot.enabled = true; wa.enabled = true; pm.enabled = true; dead = false; }
void KillPlayer() { if (this.GetComponent <PlayerAnimate>().enabled == true) { PlayerAnimate pa = this.GetComponent <PlayerAnimate>(); playermovement pm = this.GetComponent <playermovement>(); rotateToCursor rot = this.GetComponent <rotateToCursor>(); WeaponAttack wa = this.GetComponent <WeaponAttack>(); LegsDirection legDir = this.GetComponentInChildren <LegsDirection>(); wa.dropWeapon(); pa.legs.sprite = null; pa.legs.enabled = false; legDir.enabled = false; pa.torso.sprite = deadSpr; pa.enabled = false; rot.enabled = false; wa.enabled = false; pm.enabled = false; BoxCollider2D col = this.GetComponent <BoxCollider2D>(); col.enabled = false; } }
private void Awake() { m_Memory = MemoryPull.instance; m_Player = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerAnimate>(); }
//public EnemyAttacked ea; // Use this for initialization void Start() { pa = this.GetComponent <PlayerAnimate>(); sc = GameObject.FindGameObjectWithTag("GameController").GetComponent <SpriteContainer>(); }
// Use this for initialization void Start() { pa = GetComponent <PlayerAnimate>(); sc = GameObject.FindGameObjectWithTag("Player").GetComponent <spriteContainers>(); }
void Start() { m_PlayerLife = 3; m_CoinCount = 0; m_PalyerAnimate = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerAnimate>(); }