private GameObject BuildTeamPieceContainer(TeamName teamName) { GameObject teamPieceContainer = GameObject.Find(teamName.ToString()); if (teamPieceContainer == null) { teamPieceContainer = new GameObject(teamName.ToString()); } return(teamPieceContainer); }
public void SetTeam(TeamName teamName) { _myTeam = teamName; if (_myName == "Human") { _myName = teamName.ToString(); } }
private void OnEnable() { #if UNITY_EDITOR gameObject.name = $"{m_MyTeam.ToString()}_{m_Type.ToString()}"; #endif m_SpriteRenderer = GetComponent <SpriteRenderer>(); m_MotorScript = GetComponent <Motor>(); m_HealthScript = GetComponent <Health>(); CombatManager.Instance.AddUnit((int)m_MyTeam, this); }
int IComparable.CompareTo(object obj) { if (obj is TeamData) { TeamData td = (TeamData)obj; return(TeamName.ToString().CompareTo(td.TeamName.ToString())); } else { return(0); } }
protected virtual void Start() { Debug.Log("Character, start method for: " + team.ToString() + "_" + this.name); abilityDelay = Random.Range(3, 10); // TODO... - will be set from monster Info // Set this monster's Sprite AssignSprite(); // Set monster's colider, (Make it clickable) CircleCollider2D col = this.gameObject.AddComponent <CircleCollider2D>(); col.radius = 1.0f; // Set unclickable to start MakeUnclickable(); // Discove whcih teams are friend or foe DiscoverTeams(); // Confirm Setup is complete IsSetupComplete = true; }