//public Dictionary<GameObject, > private void Awake() { if (instance != null) { Destroy(this); } instance = this; }
private void OnEnable() { PlantingManager.RegisterPlantingSpace(this, true); mesh = GetComponent <MeshFilter>().mesh; bounds = mesh.bounds; planterTiles = new List <PlanterTile>(); GeneratePlanterTiles(); }
private void Awake() { Debug.Log("Initialize Plant Manager. Bow down to your plant god, peasant"); if (plantGod == null) { plantGod = this; } else { Destroy(this); } }
public void OnPointerClick(PointerEventData eventData) { if (PlantCheck()) { PlantingManager.PickPlant(this.gameObject); } else { parent = this.gameObject; print("Spot empty"); UIManager.ShowUiElement("PlantPicker", "UI"); } }
private void Update() { previousPosition = PlayerPosition; if (Input.GetKeyDown(KeyCode.T)) { // this.SetValue("playerData.playerName", "Billy-Bob"); // bool nestedEval = this.EvaluateValue("playerData.playerName", "Billy", true); // if (nestedEval) { Debug.Log(playerData.playerName + ": " + nestedEval); } if (PlantingManager.NearestPlantingSpace != null) { PlantingSpace space = PlantingManager.NearestPlantingSpace; space.Plant(PlantingManager.GetRandomPlant()); } } }
private void Start() { plantList = new List <GameObject>(); instance = this; }