예제 #1
0
        void CheckBuild()
        {
            //Base
            if (Limits.CheckBuild(Types.ConstructionTypes.Base))
            {
                Build(MyTeam.GetProtoByType(Types.ConstructionTypes.Base));
                return;
            }

            if (Limits.CheckBuild(Types.ConstructionTypes.Barracks))
            {
                Build(MyTeam.GetProtoByType(Types.ConstructionTypes.Barracks));
                return;
            }

            if (IHaveA(Types.ConstructionTypes.Barracks))
            {
                if (Limits.CheckBuild(Types.ConstructionTypes.Assault))
                {
                    Build(MyTeam.GetProtoByType(Types.ConstructionTypes.Assault));
                }

                if (Limits.CheckBuild(Types.ConstructionTypes.Gunner))
                {
                    Build(MyTeam.GetProtoByType(Types.ConstructionTypes.Gunner));
                }
            }

            if (Limits.CheckBuild(Types.ConstructionTypes.VehicleFactory))
            {
                Build(MyTeam.GetProtoByType(Types.ConstructionTypes.VehicleFactory));
                return;
            }
        }
예제 #2
0
 // build from UI
 public void BuildBase()
 {
     if (Limits.CheckBuild(Types.ConstructionTypes.Base))
     {
         Build(MyTeam.GetProtoByType(Types.ConstructionTypes.Base));
     }
 }