void Start() { _mesh = GetComponent <MeshFilter>().mesh; _col = GetComponent <MeshCollider>(); if (_chunkPos.Equals(new Int3(-4, 0, -4))) { GameObject prefab = Instantiate(_troopCenter, transform); // Set location Vector3 pos = prefab.transform.localPosition; pos.x = 8f; pos.z = 8f; pos.y = 0.5f + World.GenerateTopology(-55, -55); prefab.transform.localPosition = pos; // Set team prefab.GetComponent <TroopCenter>().SetTeam(Selectable.Team.Red); } if (_chunkPos.Equals(new Int3(4, 0, 4))) { GameObject prefab = Instantiate(_townCenter, transform); // Set location Vector3 pos = prefab.transform.localPosition; pos.x = 8f; pos.z = 8f; pos.y = 0.5f + World.GenerateTopology(70, 70); prefab.transform.localPosition = pos; // Set team prefab.GetComponent <TroopCenter>().SetTeam(Selectable.Team.Blue); } }
public bool Equals(ObjectKey other) { return(name == other.name && position.Equals(other.position) && faceCell.Equals(other.faceCell) && direction == other.direction); }
public bool Equals(BlockBody other) { return(pos.Equals(other.pos)); }