Esempio n. 1
0
    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);
    }
Esempio n. 2
0
 void Awake()
 {
     joyStick = GameObject.Find("JoyStick").GetComponentInChildren <JoyStickControl>();
     anim     = GetComponentInChildren <Animator>();
     rigid    = GetComponent <Rigidbody>();
 }
Esempio n. 3
0
 void OnEnable()
 {
     instance = this;
 }
Esempio n. 4
0
 public void InitInstance()
 {
     instance = this;
 }
Esempio n. 5
0
 private void Start()
 {
     networkIdentity = GetComponent <NetworkIdentity>();
     motion          = GetComponent <GetMotion>();
     joyStick        = JoyStickControl.instance;
 }