Exemplo n.º 1
0
        public Result UpgradeController(StructureController controller)
        {
            var result = new Result {
                TypeID = ResultTypes.UnknownError
            };

            if (controller != null)
            {
                int range = Pos.GetRangeTo(controller.Pos);

                if (range <= 1)
                {
                    if (typeof(StructureController).IsAssignableFrom(controller.GetType()))
                    {
                        result = Game.AddAction(new CreepUpgrade(this, controller));
                    }
                    else
                    {
                        result = new Result {
                            TypeID = ResultTypes.InvalidTarget
                        };
                    }
                }
                else
                {
                    result = new Result {
                        TypeID = ResultTypes.TooFar
                    };
                }
            }
            else
            {
                result = new Result {
                    TypeID = ResultTypes.EmptyTarget
                };
            }

            return(result);
        }
Exemplo n.º 2
0
 public Result GenerateSafeMode(StructureController controller)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 3
0
 public Result SignController(StructureController controller, string msg = null)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 4
0
 public Result ClaimController(StructureController controller)
 {
     throw new NotImplementedException();
 }