// Use this for initialization void Start () { platformType = PlatformS.GetPlatform (); //nextLevelString = LevelSelectMenu.selectedLevelString; followRef = GetComponent<CameraFollowS>(); ScoreKeeperS.gameStarted = true; #if UNITY_WIIU wiiUInput2 = GameObject.Find("WiiUControlHandlerPlayer" + 2).GetComponent<WiiUControllerManagerS>(); wiiUInput3 = GameObject.Find("WiiUControlHandlerPlayer" + 3).GetComponent<WiiUControllerManagerS>(); wiiUInput4 = GameObject.Find("WiiUControlHandlerPlayer" + 4).GetComponent<WiiUControllerManagerS>(); #endif }
// Use this for initialization void Start () { platformType = PlatformS.GetPlatform(); ownRender = GetComponent<Image>(); // turn off cursor obj cursorObj.SetActive(false); TurnOffText(); currentCursorPos = 0; ownRender.enabled = false; #if UNITY_WIIU wiiUInput2 = GameObject.Find("WiiUControlHandlerPlayer2").GetComponent<WiiUControllerManagerS>(); wiiUInput3 = GameObject.Find("WiiUControlHandlerPlayer3").GetComponent<WiiUControllerManagerS>(); wiiUInput4 = GameObject.Find("WiiUControlHandlerPlayer4").GetComponent<WiiUControllerManagerS>(); #endif }
// Use this for initialization void Start () { platformType = PlatformS.GetPlatform(); ownRigid = GetComponent<Rigidbody>(); spriteObjRender = spriteObject.GetComponent<SpriteRenderer>(); dangerousSprite.GetComponent<SpriteRenderer>().enabled = false; allSpawnPts = GameObject.FindGameObjectsWithTag("Spawn"); physicsLayerDefault = gameObject.layer; if (GlobalVars.characterSelected && GlobalVars.launchingFromScene) { //assign character numbers from global vars when spawning only in game, not while in character select screen characterNum = GlobalVars.characterNumber [playerNum - 1]; } SetSkin (); soundSource = GetComponent<PlayerSoundS>(); if (GameObject.Find("BlueFlash")){ lv2Flash = GameObject.Find("BlueFlash").GetComponent<FlashObjS>(); } if (GameObject.Find("RedFlash")){ lv3Flash = GameObject.Find("RedFlash").GetComponent<FlashObjS>(); } initialSpawnParticles = Instantiate (initialSpawnParticlesPrefab, this.transform.position, Quaternion.identity) as GameObject; initialSpawnParticles.GetComponent<ParticleSystem>().startColor = playerParticleMats[characterNum - 1].GetColor("_TintColor"); chargeSource = GetComponent<AudioSource>(); startDrag = ownRigid.drag; startEctoNum = initialHealth; // for ecto mode tail generation #if UNITY_WIIU if (playerNum > 1){ wiiUInput = GameObject.Find("WiiUControlHandlerPlayer" + playerNum).GetComponent<WiiUControllerManagerS>(); } #endif //Get number of lives (mode stuff) }
public void AddwiiUInputManger(WiiUControllerManagerS wii){ wiiUInput = wii; }