// private void CheckActionButton() { if (XCI.GetButtonDown(XboxButton.X)) { elementController.SetSelectedElement(Element.Rain); } if (XCI.GetButtonDown(XboxButton.Y)) { elementController.SetSelectedElement(Element.Sunlight); } if (XCI.GetButtonDown(XboxButton.B)) { elementController.SetSelectedElement(Element.Time); } }
// Update is called once per frame void Update() { if (XCI.GetButtonDown(XboxButton.A)) { elementController.SetSelectedElement(Element.Seed); } if (XCI.GetAxis(XboxAxis.RightTrigger) > 0.1f) { if (elementController.IsSelectedElementSeed()) { SpawnPlant(); } } }