/// <summary> /// Spawns and Configs a CargoSprite depending on AcceptsCargo /// Only used for AcceptsCargo Sprites /// </summary> /// <param name="ac"></param> void SpawnAndConfigCargoSpriteRecives(AcceptsCargo ac) { if (!dontSpawnAnything) { foreach (CardinalPoint cp in ac.direction) { GameObject GO = SpawnCargoSprite(cp); CargoSprite cs = GO.GetComponent <CargoSprite>(); if (GameConfig.s != null) { SpawnArrow(cp, GameConfig.s.cargoColors[(int)ac.CargoType], false, true); } else { SpawnArrow(cp, Color.white, false, true); } ac.myCargoSpriteReference.Add(cs); } } ac.myBuilding = this; ac.UpdateMyCargoSprites(); OnTruckLoadStation += ac.TruckOnPointListener; }
public override bool Equals(object obj) { AcceptsCargo other = (AcceptsCargo)obj; return(this.CargoType == other.CargoType && this.direction == other.direction && this.moneyGained == other.moneyGained); }