public void BeginGroupFill(FoE side) { if (this.GoodOrEvil != side) { ResetGroup(); } GroupState = GROUPSTATE.UnderConstruction; GoodOrEvil = side; }
public void AddUnit(GameObject newUnit) { if (MemberUnit.Count == 0) { this.GoodOrEvil = newUnit.GetComponent <UnitScript>().GoodOrEvil; position = newUnit.transform.position; } if (newUnit.GetComponent <UnitScript>().GoodOrEvil == this.GoodOrEvil) { MemberUnit.Add(newUnit); } }
//--- Startup and Main-functionality: //############################################################################### void Awake() { GoodOrEvil = new FoE(goodOrEvil); LifebarScript = ScriptableObject.CreateInstance <Lifebar>(); Options = gameObject.GetComponent <UnitOptions>(); if (!gameObject.GetComponentInChildren <UnitWeapon>()) { weapon = gameObject.AddComponent <NoWeapon>(); } else { weapon = gameObject.GetComponentInChildren <UnitWeapon>(); } if (!IsABuilding && this.GoodOrEvil == FoE.GOODorEVIL.Good) { ResourceManager.AddResouce(ResourceManager.Resource.LABORER, 1); } }
public bool IsEnemy(FoE other) { return(this.GoodOrEvil + other); }
public void SetShooter(GameObject unit) { // UNIT = unit.GetComponent<UnitScript>(); GoodOrEvil = unit.GetComponent<UnitScript>().GoodOrEvil; }
public FoE(FoE a, FoE b) { FE = a.FE + b.FE; FE = (byte)this; }
public void SetShooter(GameObject unit) { // UNIT = unit.GetComponent<UnitScript>(); GoodOrEvil = unit.GetComponent <UnitScript>().GoodOrEvil; }
public FoE(FoE fe) { FE = fe.FE; }
public void BeginGroupFill(FoE side) { if (this.GoodOrEvil != side) ResetGroup(); GroupState = GROUPSTATE.UnderConstruction; GoodOrEvil = side; }
public void AddUnit(GameObject newUnit) { if (MemberUnit.Count == 0) { this.GoodOrEvil = newUnit.GetComponent<UnitScript>().GoodOrEvil; position = newUnit.transform.position; } if (newUnit.GetComponent<UnitScript>().GoodOrEvil == this.GoodOrEvil) { MemberUnit.Add(newUnit); } }
public bool IsEnemy(FoE other) { return this.GoodOrEvil+other; }
//--- Startup and Main-functionality: //############################################################################### void Awake() { GoodOrEvil = new FoE(goodOrEvil); LifebarScript = ScriptableObject.CreateInstance<Lifebar>(); Options = gameObject.GetComponent<UnitOptions>(); if (!gameObject.GetComponentInChildren<UnitWeapon>()) weapon = gameObject.AddComponent<NoWeapon>(); else weapon = gameObject.GetComponentInChildren<UnitWeapon>(); if (!IsABuilding && this.GoodOrEvil == FoE.GOODorEVIL.Good) { ResourceManager.AddResouce(ResourceManager.Resource.LABORER, 1); } }
public void SetTarget(Vector3 targetPosition, FoE.GOODorEVIL foe) { Target = targetPosition; this.GoodOrEvil = new FoE(foe); }