// Use this for initialization void Start() { instance = this; keyPos.Add(KeyCode.Q, GameObject.Find("Q")); keyPos.Add(KeyCode.W, GameObject.Find("W")); keyPos.Add(KeyCode.E, GameObject.Find("E")); keyPos.Add(KeyCode.R, GameObject.Find("R")); keyPos.Add(KeyCode.T, GameObject.Find("T")); keyPos.Add(KeyCode.Y, GameObject.Find("Y")); keyPos.Add(KeyCode.U, GameObject.Find("U")); keyPos.Add(KeyCode.I, GameObject.Find("I")); keyPos.Add(KeyCode.O, GameObject.Find("O")); keyPos.Add(KeyCode.P, GameObject.Find("P")); keyPos.Add(KeyCode.A, GameObject.Find("A")); keyPos.Add(KeyCode.S, GameObject.Find("S")); keyPos.Add(KeyCode.D, GameObject.Find("D")); keyPos.Add(KeyCode.F, GameObject.Find("F")); keyPos.Add(KeyCode.G, GameObject.Find("G")); keyPos.Add(KeyCode.H, GameObject.Find("H")); keyPos.Add(KeyCode.J, GameObject.Find("J")); keyPos.Add(KeyCode.K, GameObject.Find("K")); keyPos.Add(KeyCode.L, GameObject.Find("L")); keyPos.Add(KeyCode.Z, GameObject.Find("Z")); keyPos.Add(KeyCode.X, GameObject.Find("X")); keyPos.Add(KeyCode.C, GameObject.Find("C")); keyPos.Add(KeyCode.V, GameObject.Find("V")); keyPos.Add(KeyCode.B, GameObject.Find("B")); keyPos.Add(KeyCode.N, GameObject.Find("N")); keyPos.Add(KeyCode.M, GameObject.Find("M")); }
//public FMOD.Studio.EventInstance[] bgmS; void Awake() { sentOutOfGoopMessage = false; spawnPosition = transform.position; type = OldPlantType.Spread; mousePos = Input.mousePosition; Services.PlayerController = this; p_state = GetComponent <PlayerState>(); p_sc = GetComponent <PlayerSc>(); rb = GetComponent <Rigidbody>(); collider = GetComponent <CapsuleCollider>(); cam = Camera.main; layerGround = LayerMask.NameToLayer("Ground"); Cursor.lockState = CursorLockMode.Locked; mouseLook = cam.gameObject.GetComponent <MouseLook>(); mouseLook.EnableLook(); fadeOut.gameObject.SetActive(true); }