Esempio n. 1
0
        public Fire()
        {
            IsPassable = false;

            Size = new Size(1, 1);

            Id = 0x00000600;

            ObjectWithState =
                new ObjectWithState(
                    new List <ObjectState>
            {
                new ObjectState(ObjectStates.ObjectStates.Firing)
                {
                    TickCount = 300, Distribution = 10, Eternal = false
                },
                new ObjectState(ObjectStates.ObjectStates.Attenuating)
                {
                    TickCount = 150, Distribution = 10, Eternal = false
                }
            },
                    false,
                    OnLastStateFinished);

            Name = "Fire";
        }
Esempio n. 2
0
        public FixedObjectWithState(ObjectWithStateContext context)
            : base(context)
        {
            var props = context.ObjectStateProps.Select(pair => new ObjectState(pair.Key, pair.Value)).ToList();

            ObjectWithState =
                new ObjectWithState(
                    props,
                    false,
                    OnLastStateFinished);
        }
Esempio n. 3
0
        public Mushroom(MushroomContext context) : base(context)
        {
            BaseIds = context.BaseIds;

            ObjectWithState =
                new ObjectWithState(
                    new List <ObjectState>
            {
                new ObjectState(ObjectStates.ObjectStates.Growing, context.GrowingProps),
                new ObjectState(ObjectStates.ObjectStates.Staying, context.StayingProps)
            },
                    false,
                    OnLastStateFinished);
        }
Esempio n. 4
0
        public Plant(PlantContext plantContext) : base(plantContext)
        {
            _plantContext = plantContext;

            ObjectWithState =
                new ObjectWithState(
                    new List <ObjectState>
            {
                new ObjectState(ObjectStates.ObjectStates.Growing, plantContext.GrowingProps),
                new ObjectState(ObjectStates.ObjectStates.Staying, plantContext.StayingProps),
                new ObjectState(ObjectStates.ObjectStates.Drying, plantContext.DryingProps)
            },
                    false,
                    OnLastStateFinished);
        }