コード例 #1
0
ファイル: PlayerControl.cs プロジェクト: tediris/CS194GameDev
    // Use this for initialization
    void Start()
    {
        shop           = GetComponent <PlayerShop> ();
        playerBody     = GetComponent <Rigidbody2D> ();
        networkInfo    = GetComponent <NetSetup> ();
        carryControl   = GetComponent <CarryControl> ();
        anim           = GetComponent <Animator> ();
        gravityInitial = playerBody.gravityScale;
        wallCheck      = GetComponentInChildren <WallCheck> ();
        baitManager    = GetComponent <BaitManager> ();
        string[] controllers = Input.GetJoystickNames();
        foreach (string s in controllers)
        {
            Debug.Log(s);
        }
        if (controllers.Length > 0)
        {
            controllerEnabled = true;
        }
        input = new GeneralInput();
        input.controllerEnabled = controllerEnabled;
//
//		superJumpModeText = GameObject.Find ("PowerJumpMode").GetComponent<Text> ();
    }
コード例 #2
0
ファイル: PlayerControl.cs プロジェクト: tediris/CS194GameDev
	// Use this for initialization
	void Start () {
		shop = GetComponent<PlayerShop> ();
		playerBody = GetComponent<Rigidbody2D> ();
		networkInfo = GetComponent<NetSetup> ();
		carryControl = GetComponent<CarryControl> ();
		anim = GetComponent<Animator> ();
		gravityInitial = playerBody.gravityScale;
		wallCheck = GetComponentInChildren<WallCheck> ();
		baitManager = GetComponent<BaitManager> ();
		string[] controllers = Input.GetJoystickNames ();
		foreach (string s in controllers) {
			Debug.Log (s);
		}
		if (controllers.Length > 0) {
			controllerEnabled = true;
		}
		input = new GeneralInput ();
		input.controllerEnabled = controllerEnabled;
//
//		superJumpModeText = GameObject.Find ("PowerJumpMode").GetComponent<Text> ();
	}