// Use this for initialization void Awake() { separatorchars = new char[] { '\t', '\n', '\r' }; parsed = upgradeTable.text.Split(separatorchars, System.StringSplitOptions.RemoveEmptyEntries); m_pShoot = gameObject.GetComponent <playerShoot> (); m_pControl = gameObject.GetComponent <playerController> (); }
// Start is called before the first frame update void Start() { myBody = gameObject.GetComponent <Rigidbody2D>(); myCollider = gameObject.GetComponent <BoxCollider2D>(); myRenderer = gameObject.GetComponent <SpriteRenderer>(); movie = GetComponent <Animator>(); // INVENTORY nuelbeloved.GetComponent <fourOHfour>(); // nuel's object + script omubeloved.GetComponent <omuBehavior>(); grudgebeloved.GetComponent <strawberryBehavior>(); // KAORU PUZZLE c_shoot = GetComponent <playerShoot>(); toast.GetComponent <toasterBehavior>(); oven.GetComponent <ovenBehavior>(); stove.GetComponent <stoveBehavior>(); warningBOX.enabled = false; warningTXT.enabled = false; // MILK PUZZLE milk.GetComponent <milkBehavior>(); choco.GetComponent <chocoBehavior>(); strawberry.GetComponent <strawberryBehavior>(); }
void Awake() { anim = GetComponent <Animator> (); playerAudio = GetComponent <AudioSource> (); playerMovement = GetComponent <playerMove> (); playerShooting = GetComponentInChildren <playerShoot> (); currentHealth = startingHealth; }
//bool isDead; void Awake() { pHealth = GameObject.FindGameObjectWithTag("Player").GetComponent <playerHealth>(); anim = GetComponent <Animator>(); //绑定动画 pMovement = GetComponent <playerMovement>(); //绑定自定义引动脚本 pShooting = GetComponentInChildren <playerShoot>(); currentTime = startingTime; //设置初始生命值 }
void Awake() { p_Shoot = this; m_rigidbody = rigidbody; //source = GetComponent <AudioSource>(); projectileSprite = projectileSpriteNormal; currentAmmoType = ProjectileType.NORMAL; }
void Awake() { anim = GetComponent <Animator>(); //绑定动画 // playerAudio = GetComponent<AudioSource>(); pMovement = GetComponent <playerMovement>(); //绑定移动脚本 pShooting = GetComponentInChildren <playerShoot> (); currentHealth = startingHealth; //设置初始生命值 }
// Use this for initialization void Start() { theRigidBody = GetComponent <Rigidbody2D>(); sr = GetComponent <SpriteRenderer>(); lsr = legsSprite.GetComponent <SpriteRenderer>(); pAim = GameObject.FindObjectOfType(typeof(playerAim)) as playerAim; smScript = SoundManager.GetComponent <soundManager>(); pShoot = GameObject.FindObjectOfType(typeof(playerShoot)) as playerShoot; }
// Use this for initialization void Start() { inventory = GameObject.Find("Player/Backpack").GetComponent <itemController> (); shootHandler = GameObject.Find("Player").GetComponent <playerShoot> (); if (!isExist) { isExist = true; DontDestroyOnLoad(transform.gameObject); } else { Destroy(gameObject); } }
void OnTriggerEnter2D(Collider2D collider) { if (collider.gameObject.tag == "Enemy") { Debug.Log("Entered Enemy"); GameObject thePlayer = GameObject.Find("Player"); playerShoot playerShoot = thePlayer.GetComponent <playerShoot>(); Collider2D[] enemiesToDamage = Physics2D.OverlapCircleAll(attackPos.position, attackRange, whoIsEnemy); for (int i = 0; i < enemiesToDamage.Length; i++) { enemiesToDamage[i].GetComponent <enemyController>().TakeDamage(playerShoot.damageTook); Instantiate(hitEffect, this.transform.position, Quaternion.identity); } } }
// Use this for initialization void Awake() { //EnterState (GameStates.INTRO); control = this; Time.timeScale = 1; player = GameObject.FindGameObjectWithTag("Player"); m_pShoot = player.GetComponent <playerShoot> (); m_pControl = player.GetComponent <playerController> (); m_pHealth = player.GetComponent <playerHealth> (); boardScript = GetComponent <BoardManager>(); //m_currentGameState = GameStates.RUNNING; powerupAnimator = FindObjectOfType <powerupDisplayController> ().transform.GetChild(0).GetComponent <Animator> (); teleportAnimator = teleportobj.GetComponent <Animator> (); body = m_pControl.GetComponent <SpriteRenderer> (); arm = m_pControl.transform.GetChild(0).GetChild(0).GetComponent <SpriteRenderer> (); missao.gameObject.SetActive(false); m_boss = null; audios = GetComponents <AudioSource> (); teleportSound = audios[0]; weaponUpgradeSound = audios[1]; armorUpgradeSound = audios[2]; }
// Use this for initialization void Start() { instance = this; }
public void Awake() { enemyWaypoint = gameObject.GetComponent <followWaypoints>(); projectileInfo = GameObject.Find("_fireingPoint").GetComponent <playerShoot>(); }
// Use this for initialization void Start() { originalPlace = GameObject.FindGameObjectWithTag("OrbPlaceholder"); playerShoot = GameObject.FindGameObjectWithTag("Player").GetComponent <playerShoot>(); }
//Touch myTouch = Input.GetTouch (0); //don't think I need this for anything void Start () { player = GameObject.FindWithTag("Player"); test = player.GetComponent<playerShoot>(); }