private void Awake() { lr = GetComponent <LineRenderer>(); grappleGun = GetComponent <GrappleGun>(); gunRotation = GetComponent <GunRotation>(); gun = GetComponent <Gun>(); }
void Start() { //Gun setup triggerDelayReset = triggerDelay; bulletsReset = bullets; rotation = GetComponent <GunRotation>(); uiComponent = GameObject.Find("UiManger").GetComponent <UiGun>(); hands = GameObject.Find("hands"); }
void Awake() { character_list[player_id] = this; rigid = GetComponent <Rigidbody2D>(); capsule_coll = GetComponent <CapsuleCollider2D>(); coll_start_h = capsule_coll.size; coll_start_off = capsule_coll.offset; start_scale = transform.localScale; average_ground_pos = transform.position; last_ground_pos = transform.position; hp = max_hp; contact_filter = new ContactFilter2D(); contact_filter.layerMask = ground_layer; contact_filter.useLayerMask = true; contact_filter.useTriggers = false; gunRotation = GetComponentInChildren <GunRotation>(); gun = GetComponentInChildren <Gun>(); }
void OnEnable() { if (HealthScript == null) { HealthScript = GetComponent <IDamagable> (); } if (inputManager == null) { inputManager = GetComponent <T> (); } if (GunFire == null) { GunFire = GetComponentInChildren <GunFire> (); } if (GunRotation == null) { GunRotation = GetComponentInChildren <GunRotation> (); } if (rb == null) { rb = GetComponent <Rigidbody2D> (); } if (GameManager.Instance == null) { FindObjectOfType <GameManager> ().AddPlayersToList(this); } else { GameManager.Instance.AddPlayersToList(this); } SuscribeToEvents(); }
// Use this for initialization void Start() { gunRot = GameObject.Find("Gun").GetComponent <GunRotation>(); }
// Use this for initialization void Awake() { gunRotation = GetComponentInChildren <GunRotation>(); playerRigid = GetComponent <Rigidbody2D>(); anim = GetComponent <Animator>(); }