private void SetPogPosition(Pog pog, int index) { float pogHeight = PogManager.Instance.PogSettings.PogHeight; Vector3 position = transform.position; position.y += pogHeight * index * (pogHeight / 2.0f); pog.transform.position = position; }
private static void CreatePog(PogTower pt) { GameObject pogObject = (GameObject)PrefabUtility .InstantiatePrefab(PogManager.Instance.PogSettings.PogPrefab); Pog pog = pogObject.GetComponent <Pog>(); pog.transform.SetParent(pt.transform); pt.AddPog(pog); }
private static void DestroyPog(PogTower pt) { if (pt.PogList.Count == 0) { return; } Pog pog = pt.PogList[pt.PogList.Count - 1]; pt.RemovePog(pog); GameObject.DestroyImmediate(pog.gameObject); }
public void RemovePog(Pog pog) { _pogList.Remove(pog); }
public void AddPog(Pog pog) { _pogList.Add(pog); }