private void Start() { BoomStat = base.gameObject.GetComponent <CollisionWeapon>(); if (source == null) { source = GameObject.Find("SoundEffect").GetComponent <AudioSource>(); } Manager = GameObject.Find("GameManager"); gManag = Manager.GetComponent <GameManager>(); InitialLayer = base.gameObject.layer; BoomGrab.enabled = true; SkinChoose = GameObject.Find("GameManager").GetComponent <GameManager>(); rb = GetComponent <Rigidbody2D>(); if (PlayerOneOrTwo) { DirPlayer = GameObject.Find("bout2").GetComponent <PlayerDirection>(); } }
private void Start() { mainHing = base.gameObject.GetComponent <HingeJoint2D>(); saberStat = base.gameObject.GetComponent <CollisionWeapon>(); if (source == null) { source = GameObject.Find("SoundEffect").GetComponent <AudioSource>(); } Manager = GameObject.Find("GameManager"); gManag = Manager.GetComponent <GameManager>(); SkinChoose = GameObject.Find("GameManager").GetComponent <GameManager>(); rb = GetComponent <Rigidbody2D>(); if (PlayerOneOrTwo) { DirPlayer = GameObject.Find("bout2").GetComponent <PlayerDirection>(); } if (MainSabre) { InvokeRepeating("PowerRandom", 1f, 1f); } }