public DurationSquareDataChain(EnemyType enemyType, DurationEventType eventType,
                                       Movement movementType, DurationSquareData head, DurationSquareData tail,
                                       List <DurationSquareData> body, Coordinate startCoordinate, Coordinate endCoordinate)
        {
            this.enemyType = enemyType;
            this.eventType = eventType;

            this.head = head;
            this.tail = tail;

            this.body = new List <DurationSquareData>();
            this.body = body;

            complete = new List <DurationSquareData>();
            complete.Add(head);
            complete.AddRange(body);
            complete.Add(tail);
            foreach (DurationSquareData data in complete)
            {
                data.enemyType         = enemyType;
                data.movement          = movementType;
                data.durationEventType = eventType;
                data.eventData         = new DurationEventData(ActiveData.durationEventState);
            }

            this.startCoordinate = startCoordinate;
            this.endCoordinate   = endCoordinate;

            coordinates = new List <Coordinate>();
            for (int y = startCoordinate.Y; y <= endCoordinate.Y; y++)
            {
                coordinates.Add(new Coordinate(startCoordinate.X, y));
            }
        }
        public DurationSquareDataChain(String loadText, Coordinate startCoordinate, Coordinate endCoordinate)
        {
            this.head = new DurationSquareData(loadText);
            this.tail = new DurationSquareData(loadText);

            this.body = new List <DurationSquareData>();
            for (int pos = (startCoordinate.Y + 1); pos < endCoordinate.Y; pos++)
            {
                body.Add(new DurationSquareData(loadText));
            }

            this.enemyType = head.enemyType;
            this.eventType = head.durationEventType;

            complete = new List <DurationSquareData>();
            complete.Add(head);
            complete.AddRange(body);
            complete.Add(tail);

            this.startCoordinate = startCoordinate;
            this.endCoordinate   = endCoordinate;

            coordinates = new List <Coordinate>();
            for (int y = startCoordinate.Y; y <= endCoordinate.Y; y++)
            {
                coordinates.Add(new Coordinate(startCoordinate.X, y));
            }
        }
示例#3
0
 public OptionDurationEntry(Sprite spriteSheet, Vector2 position, DurationEventType eventType)
     : base(position)
 {
     this.position = position;
     displayText   = eventType.ToString();
     optionSquare  = new OptionDurationEventSquare(spriteSheet, squarePos, eventType);
 }
 public OptionDurationEventSquare(Sprite spriteSheet, Vector2 position, DurationEventType state)
     : base(spriteSheet, position)
 {
     displaySprite     = spriteSheet.GetSubSprite(new Rectangle(50, 0, 12, 12));
     optionState       = state;
     overlaySprite     = DurationSquare.GetEventSprite(state);
     readyToSetDisplay = false;
 }
 public static SortedDictionary <string, int> GetDurationSettings(DurationEventType eventType)
 {
     if (masterDurationDictionary != null)
     {
         return(ExtractValueDictionary(masterDurationDictionary[eventType]));
     }
     else
     {
         return(null);
     }
 }
        private void UpdateDurationSettings(GameTime gameTime)
        {
            DurationEventType activeDurationType = ActiveData.durationEventState;

            ICollection <string> keys = masterDurationDictionary[activeDurationType].Keys;

            foreach (String key in keys)
            {
                masterDurationDictionary[activeDurationType][key].Update(gameTime);
            }
        }
示例#7
0
        public static Sprite GetEventSprite(DurationEventType eventType)
        {
            switch (eventType)
            {
            case DurationEventType.even:
            {
                return(even);
            }

            case DurationEventType.gradient:
            {
                return(gradient);
            }

            default:
            {
                throw new ArgumentException("Invalid eventType in data");
            }
            }
        }
示例#8
0
 private void SetEvent(String eventString)
 {
     durationEventType = DataConversionLibrary.GetDurationEnumFromString(eventString);
 }
示例#9
0
        public override void Initialize()
        {
            base.Initialize();

            durationEventType = DurationEventType.even;
        }
示例#10
0
 public static string GetDurationStringFromEnum(DurationEventType type)
 {
     return(durationLibrary[type]);
 }
 public void SetDisplay(DurationEventType newEventType)
 {
     ActiveData.durationEventState = newEventType;
 }
示例#12
0
 public DurationEventData(DurationEventType eventType)
 {
     assignedEventType = eventType;
     eventSettings     = EventEditor.GetDurationSettings(eventType);
 }