예제 #1
0
    void Start()
    {
        gamepad1 = GamepadManager.Instance.GetGamepad(1);
        gamepad2 = GamepadManager.Instance.GetGamepad(2);

        offScreen = new Vector3(0, -600, -281);
    }
예제 #2
0
    void Start()
    {
        manager      = GamepadManager.Instance;
        gamepad      = manager.GetGamepad(papa);
        rb           = GetComponent <Rigidbody>();
        scoreManager = Score.Instance;
        view         = Camera.main;

        //GetComponentInChildren<Renderer>().material.color = Random.ColorHSV(0f, 1f, 1f, 1f, 0.5f, 1f);
        //renderer.material.SetColor("_ToonShade",myColor);
        colorChanger.GetComponent <Renderer>().material.SetColor("_Color", Random.ColorHSV(0f, 1f, 1f, 1f, 0.5f, 1f));
        if (papa == 1)
        {
            scoreManager.score1 = 0;
        }
        if (papa == 2)
        {
            scoreManager.score2 = 0;
        }
        if (papa == 3)
        {
            scoreManager.score3 = 0;
        }
        if (papa == 4)
        {
            scoreManager.score4 = 0;
        }
    }
예제 #3
0
 void Start()
 {
     manager  = GamepadManager.Instance;
     gamepad1 = manager.GetGamepad(1);
     gamepad2 = manager.GetGamepad(2);
     gamepad3 = manager.GetGamepad(3);
     gamepad4 = manager.GetGamepad(4);
 }
예제 #4
0
    // Use this for initialization
    void Start()
    {
        manager = GamepadManager.Instance;
        //  gamepad = manager.GetGamepad();
        gamepad = manager.GetGamepad(1);

        StartCoroutine(Gamepadator());
    }
예제 #5
0
 void Start()
 {
     //gameManager.AddPlayer (this);
     manager   = GamepadManager.Instance;
     gamepad   = manager.GetGamepad(playerIndex);
     rigidbody = GetComponent <Rigidbody>();
     song.SetActive(false);
     InitializeVariables();
     Camera.main.GetComponent <LightManager>().CraneOrOwlLight();
 }
예제 #6
0
    void Start()
    {
        gamepadMan = GamepadManager.Instance;
        gamepad    = gamepadMan.GetGamepad(player);

        for (int i = 0; i < cardOrder.Count; i++)
        {
            cardOrder[i].cardIndex = i;
        }
    }
예제 #7
0
    void Start()
    {
        // Getting the gamepad
        manager = GamepadManager.Instance;
        gamepad = manager.GetGamepad(playerIndex);

        // Getting the shader scripts from the camera
        bawShader   = Camera.main.GetComponent <ReplacementShaderEffect>();
        postProcess = Camera.main.GetComponent <PostProcessingBehaviour>();
        glowFlash   = Camera.main.GetComponent <QuickGlow>();

        // Finding the black image animator inside the scene
        Animator[] _allAnimator = FindObjectsOfType <Animator>();
        foreach (Animator anim in _allAnimator)
        {
            if (anim.gameObject.name == "BlackImage")
            {
                blackImageAnimator = anim;
            }
        }

        // Finding the white image animator inside the scene
        foreach (Animator anim in _allAnimator)
        {
            if (anim.gameObject.name == "WhiteImage")
            {
                whiteImageAnimator = anim;
            }
        }

        lightManager = Camera.main.GetComponent <LightManager>();

        // Setting the light rendering settings in the camera
        if (isCrane == true)
        {
            lightManager.hasCraneLights = true;
        }

        // Adding the appropriate lense to the list if toggled in the inspector
        if (isCrane == false)
        {
            lensesList.Add("bawLense");
        }

        if (isCrane == true)
        {
            // later on : the nightLense should be added to the lenseList if the crane bird takes it
            lensesList.Add("nightLense");
        }

        // Setting no lense as the initial lense
        lensCounter = 0;
        currentLens = lensesList[lensCounter];
    }
예제 #8
0
 void Start()
 {
     PlayerPrefs.DeleteAll();
     PlayerPrefs.SetInt("Players", 1);
     startColor = l1.color;
     totalPlayers = 1;
     lockedI = 1;
     gamepad1 = GamepadManager.Instance.GetGamepad(1);
     gamepad2 = GamepadManager.Instance.GetGamepad(2);
     gamepad3 = GamepadManager.Instance.GetGamepad(3);
     gamepad4 = GamepadManager.Instance.GetGamepad(4);
 }
예제 #9
0
    // Update is called once per frame
    void Update()
    {
        // Obtain the desired gamepad from GamepadManager
        gamepad = GamepadManager.Instance.GetGamepad(1);

        // Sample code to test button input and rumble
        if (gamepad.GetButtonDown("A"))
        {
            TestRumble();
            Debug.Log("A down");
        }
    }
예제 #10
0
    void Start()
    {
        gamepadMan = GamepadManager.Instance;
        gamepad1   = gamepadMan.GetGamepad(1);
        gamepad2   = gamepadMan.GetGamepad(2);

        agent1 = player1.agent.transform.parent;
        agent2 = player2.agent.transform.parent;

        agentOriginPos1 = agent1.localPosition;
        agentOriginPos2 = agent2.localPosition;
    }
예제 #11
0
파일: Player.cs 프로젝트: Neicul123/Grad
 public void SetPlayerVariables(int _playerID, int _playerClass)
 {
     if (_playerID == 1) { playerID = 1; prefix = "P1_"; gamepad = GamepadManager.Instance.GetGamepad(playerID); }
     if (_playerID == 2) { playerID = 2; prefix = "P2_"; gamepad = GamepadManager.Instance.GetGamepad(playerID); }
     if (_playerID == 3) { playerID = 3; prefix = "P3_"; gamepad = GamepadManager.Instance.GetGamepad(playerID); }
     if (_playerID == 4) { playerID = 4; prefix = "P4_"; gamepad = GamepadManager.Instance.GetGamepad(playerID); }
     if (_playerClass == 0) { playerClass = Basestats.Classes.Spinner; gameObject.AddComponent<Spinner>(); }
     if (_playerClass == 1) { playerClass = Basestats.Classes.Blaster; gameObject.AddComponent<Blaster>(); }
     if (_playerClass == 2) { playerClass = Basestats.Classes.Crusher; gameObject.AddComponent<Crusher>(); }
     if (_playerClass == 3) { playerClass = Basestats.Classes.Tank; gameObject.AddComponent<Tank>(); }
     coins = PlayerPrefs.GetInt(prefix + "Coins");
     GetStats();
 }
예제 #12
0
    // Use this for initialization
    void Awake()
    {
        GameManager.instance.AddRunner(this);
        m_Gamepad = GamepadManager.Instance.GetGamepad(m_PlayerIndex);

        m_Controller = GetComponent <CharacterController>();
        m_Animator   = GetComponent <Animator>();

        characterState = CharacterState.withEgg;
        m_BeginZ       = transform.position.z;

        m_EggBeginPosition = m_EggController.transform.localPosition;
        m_BeginRotation    = m_EggController.transform.localRotation;

        StartCoroutine(EggHitDetection());
        StartCoroutine(DetectConnected());
    }
예제 #13
0
    void Awake()
    {
        if (player1)
        {
            // Obtain the desired gamepad from GamepadManager
            gamepad = GamepadManager.Instance.GetGamepad(1);
            h1      = p1h1;
            h2      = p1h2;
            h3      = p1h3;
            h4      = p1h4;
        }
        else
        {
            // Obtain the desired gamepad from GamepadManager
            gamepad = GamepadManager.Instance.GetGamepad(2);
            h1      = p2h1;
            h2      = p2h2;
            h3      = p2h3;
            h4      = p2h4;
        }

        dodgeTimer = dodgeCool;
    }
예제 #14
0
 // Use this for initialization
 void Start()
 {
     manager = GamepadManager.Instance;
     gamepad = manager.GetGamepad(playerIndex);
     HideSlide();
 }
예제 #15
0
 public void LoadGamepad(int index)
 {
     gamepad = manager.GetGamepad(index + 1);
 }
예제 #16
0
    private x360_Gamepad gamepad; // Gamepad instance

    // Use this for initialization
    void Start()
    {
        // Obtain the desired gamepad from GamepadManager
        gamepad = GamepadManager.Instance.GetGamepad(playerIndex);
        //print(playerIndex + " " + gamepad.GetHashCode());
    }
예제 #17
0
파일: letest.cs 프로젝트: Sauroctone/CARE
 // Use this for initialization
 void Start()
 {
     manager = GamepadManager.Instance;
     //  gamepad = manager.GetGamepad();
     gamepad = manager.GetGamepad(papa);
 }
예제 #18
0
 void Start()
 {
     rb      = GetComponent <Rigidbody> ();
     manager = GamepadManager.Instance;
     gamepad = manager.GetGamepad(player);
 }
예제 #19
0
 // Use this for initialization
 void Start()
 {
     manager = GamepadManager.Instance;
     gamepad = manager.GetGamepad(1);
 }
예제 #20
0
 void Start()
 {
     Gamepad = GamepadManager.Instance.GetGamepad(playerNumber);
 }
예제 #21
0
 void Start()
 {
     manager = GamepadManager.Instance;
     gamepad = manager.GetGamepad(playerIndex);
     dust.Stop();
 }