public static void Init() { //puckBall = GameObject.Find("PuckBall"); //player = GameObject.Find("Player"); puckBall = GameManager._instance.PuckBall; player = GameManager._instance.Player; controlButton = GameManager._instance.PuckButton; joyStickControl = GameManager._instance.GlobalControllerObject.GetComponent <JoyStickControl>(); Physics2D.IgnoreLayerCollision(LayerMask.NameToLayer("playerBody"), LayerMask.NameToLayer("puck"), true); //joyStickControl = GameObject.Find("GlobalController").GetComponent<JoyStickControl>(); //controlButton = GameObject.Find("Button"); Hide(puckBall); }
void Awake() { joyStick = GameObject.Find("JoyStick").GetComponentInChildren <JoyStickControl>(); anim = GetComponentInChildren <Animator>(); rigid = GetComponent <Rigidbody>(); }
void OnEnable() { instance = this; }
public void InitInstance() { instance = this; }
private void Start() { networkIdentity = GetComponent <NetworkIdentity>(); motion = GetComponent <GetMotion>(); joyStick = JoyStickControl.instance; }