예제 #1
0
 public ProximityFlag(int objectiveID, string objectiveName, int x, int y, int z, int o, Scenario_Object obj = null)
 {
     ObjectiveID    = objectiveID;
     ObjectiveName  = objectiveName;
     _x             = x;
     _y             = y;
     _z             = z;
     ScenarioObject = obj;
     for (int i = 0; i < 2; i++)
     {
         playersInRange[i] = new List <Player>();
     }
 }
예제 #2
0
        public ProximityFlag(int objectiveID, string objectiveName, int x, int y, int z, int o, byte capturePoints, byte tickPoints, Scenario_Object obj = null)
        {
            ObjectiveID   = objectiveID;
            ObjectiveName = objectiveName;
            _x            = x;
            _y            = y;
            _z            = z;
            Heading       = (ushort)o;

            CapturePoints  = capturePoints;
            TickPoints     = tickPoints;
            ScenarioObject = obj;
            for (int i = 0; i < 2; i++)
            {
                playersInRange[i] = new List <Player>();
            }
        }
예제 #3
0
        public CapturePoint(Scenario_Object scenarioObject, Func <Player, bool> captureCheck, Action <CapturePoint> onCapture)
        {
            ObjectiveID   = scenarioObject.Identifier;
            ObjectiveName = scenarioObject.ObjectiveName;
            _x            = scenarioObject.WorldPosX;
            _y            = scenarioObject.WorldPosY;
            _z            = scenarioObject.PosZ;
            _o            = scenarioObject.Heading;
            _proto        = GameObjectService.GetGameObjectProto(scenarioObject.ProtoEntry);
            _captureCheck = captureCheck;
            _onCapture    = onCapture;

            _captureText         = scenarioObject.CaptureObjectiveText.Replace("%n", ObjectiveName);
            _captureDesc         = scenarioObject.CaptureObjectiveDescription.Replace("%n", ObjectiveName);
            _holdText            = scenarioObject.HoldObjectiveText.Replace("%n", ObjectiveName);
            _holdDesc            = scenarioObject.HoldObjectiveDescription.Replace("%n", ObjectiveName);
            _captureAnnouncement = scenarioObject.CaptureAnnouncement;

            CaptureDuration = 3;
        }