Пример #1
0
        public override void LoadState(PluginDataWrapper pluginData)
        {
            var reader = pluginData.GetReaderForWrappedSequentialData();

            healthBar = HealthBarControl.Load(Level, Building, reader);

            CreatePathfindingNodes();
        }
Пример #2
0
        public override void LoadState(PluginDataWrapper pluginData)
        {
            var reader = pluginData.GetReaderForWrappedSequentialData();

            healthBar = HealthBarControl.Load(Level, Building, reader);

            ConnectNeighbours();
        }
Пример #3
0
        public override void LoadState(PluginDataWrapper pluginData)
        {
            var reader = pluginData.GetReaderForWrappedSequentialData();

            healthBar = HealthBarControl.Load(Level, Building, reader);

            for (int i = 0; i < numberOfWorkers; i++)
            {
                workers[i] = Worker.Load(reader, this, !Level.EditorMode);
            }
        }
Пример #4
0
        public override void LoadState(PluginDataWrapper pluginData)
        {
            var reader = pluginData.GetReaderForWrappedSequentialData();

            healthBar = HealthBarControl.Load(Level, Building, reader);


            clicker          = Building.GetDefaultComponent <Clicker>();
            clicker.Clicked += KeepClicked;
            window           = Building.Player == Level.HumanPlayer ? new KeepWindow(this) : null;

            CreatePathfindingNodes();
        }
Пример #5
0
        public override void LoadState(PluginDataWrapper pluginData)
        {
            var reader = pluginData.GetReaderForWrappedSequentialData();

            reader.GetNext(out float finalSize);
            FinalSize = finalSize;
            reader.GetNext(out changePerSecond);
            reader.GetNext(out currentSize);
            reader.GetNext(out currentStepTimeout);
            reader.GetNext(out curSpreadTimeout);

            SetSize(currentSize);
        }
Пример #6
0
        public override void LoadState(PluginDataWrapper pluginData)
        {
            animationController = CreateAnimationController(Unit);
            walker   = Unit.GetDefaultComponent <WorldWalker>();
            attacker = Unit.GetDefaultComponent <MovingMeeleAttacker>();

            RegisterEvents();
            var reader = pluginData.GetReaderForWrappedSequentialData();

            healthBar = HealthBarControl.Load(Level, Unit, reader);
            reader.GetNext(out bool attackMove);
            AttackMove = attackMove;
        }
Пример #7
0
        public override void LoadState(PluginDataWrapper pluginData)
        {
            Unit.AlwaysVertical = true;
            animationController = Unit.CreateComponent <AnimationController>();
            Walker  = Unit.GetDefaultComponent <WorldWalker>();
            Shooter = Unit.GetDefaultComponent <Shooter>();

            RegisterEvents(Walker, Shooter, Unit.GetDefaultComponent <UnitSelector>());

            var reader = pluginData.GetReaderForWrappedSequentialData();

            healthBar = HealthBarControl.Load(Level, Unit, reader);
            reader.GetNext(out bool attackMove);
            AttackMove = attackMove;
        }
Пример #8
0
        public override void LoadState(PluginDataWrapper pluginData)
        {
            animationController = CreateAnimationController(Unit);
            walker = Unit.GetDefaultComponent <WorldWalker>();

            RegisterEvents(walker);

            var reader = pluginData.GetReaderForWrappedSequentialData();

            healthBar    = HealthBarControl.Load(Level, Unit, reader);
            currentState = State.Load(reader, this);
            reader.GetNext(out int treeID);
            targetTree = treeID != 0 ? (Tree)Level.GetBuilding(treeID).BuildingPlugin : null;
            reader.GetNext(out int cutterID);
            Cutter = (TreeCutter)Level.GetBuilding(cutterID).BuildingPlugin;
        }
Пример #9
0
        public override void LoadState(PluginDataWrapper pluginData)
        {
            this.flier = Projectile.GetDefaultComponent <BallisticProjectile>();

            var sequential = pluginData.GetReaderForWrappedSequentialData();

            sequential.MoveNext();
            timeToSplit = sequential.GetCurrent <float>();
            sequential.MoveNext();
            splits = sequential.GetCurrent <int>();
            sequential.MoveNext();
            despawning = sequential.GetCurrent <bool>();
            sequential.MoveNext();
            timeToDespawn = sequential.GetCurrent <float>();
            sequential.MoveNext();
        }
Пример #10
0
        public override void LoadState(PluginDataWrapper pluginData)
        {
            Keep = GetKeep();
            var reader = pluginData.GetReaderForWrappedSequentialData();

            cutters      = CutterWrapper.LoadCutters(reader, this, Level);
            currentState = State.Load(reader, this);

            foreach (var wolf in Player.GetUnitsOfType(type.Wolf.UnitType))
            {
                wolfs.Add(wolf, (Wolf)wolf.Plugin);
            }

            foreach (var chicken in Player.GetUnitsOfType(type.Chicken.UnitType))
            {
                chickens.Add(chicken, (Chicken)chicken.Plugin);
            }
        }
Пример #11
0
        public override void LoadState(PluginDataWrapper pluginData)
        {
            var reader = pluginData.GetReaderForWrappedSequentialData();

            reader.GetNext(out bool isOpen);
            healthBar = HealthBarControl.Load(Level, Building, reader);

            if (isOpen)
            {
                leftDoor.SetOpen();
                rightDoor.SetOpen();
            }
            else
            {
                leftDoor.SetClosed();
                rightDoor.SetClosed();
            }

            clicker          = Building.GetDefaultComponent <Clicker>();
            clicker.Clicked += OnClicked;
            window           = new GateWindow(this);

            CreatePathfindingNodes();
        }