public Worker(Point2D position, ref VirtualIntelligence Master, ref IMoveUnitStats WorkerStats) : base(position, ref Master, ref WorkerStats) { _goingToResource = true; _unitStats = (RTS.WorkerStats)WorkerStats; _target = _masterRef.TheMap.FindResource(_masterRef, position); NewPath(_target.Position); }
public MoveUnit(Point2D position, ref VirtualIntelligence Master, ref IMoveUnitStats Stats) : base(Stats.Image, position, ref Master, Stats.MaxHealth) { _currentTimer = 1f; _currentMovePoint = position; _increaseRate = Stats.Speed / GameMain.CalculationsPerSecond; _stats = Stats; GameMain.DrawList.Add(this); GameMain.MoveUnitList.Add(this); GameMain.MoveUnitProcessList.Add(this); xChange = 0f; yChange = 0f; }
private BuildingStats CreateBuildingStats(string imageName, string BitmapName, IMoveUnitStats UnitToGenerate, float CreationTime, int buildingHealth) { BuildingStats NewBuilding = new BuildingStats(); NewBuilding.image = VisibleUnit.AddBitmap(imageName, BitmapName); NewBuilding.SetToSpawn(UnitToGenerate); NewBuilding.CreationTime = CreationTime; NewBuilding.health = buildingHealth; return(NewBuilding); }
public void SetToSpawn(IMoveUnitStats stats) { ToSpawn = stats; }
public Aggressive(Point2D position, ref VirtualIntelligence Master, ref IMoveUnitStats AggressiveStats) : base(position, ref Master, ref AggressiveStats) { _listener = new DeathListener(diaog); _unitStats = (AggressiveMoveUnitStats)AggressiveStats; }