예제 #1
0
        public PartSaver OnSave()
        {
            var saver = new PartSaver(this, info.InternalName);

            saver.Add("Activated", activated, false);
            saver.Add("Cooldown", cooldown, 0);

            return(saver);
        }
예제 #2
0
        public PartSaver OnSave()
        {
            var saver = new PartSaver(this, info.InternalName);

            saver.Add(nameof(Force), Force, CPos.Zero);
            saver.Add(nameof(Velocity), Velocity, CPos.Zero);

            return(saver);
        }
예제 #3
0
        public PartSaver OnSave()
        {
            var saver = new PartSaver(this, string.Empty);

            saver.Add("RelativeHP", RelativeHP, 1f);
            saver.Add("ActorType", ActorCache.Types[ActorType], null);
            saver.Add("CurrentTick", CurrentTick, 0);

            return(saver);
        }
예제 #4
0
        public PartSaver OnSave()
        {
            var saver = new PartSaver(this, info.InternalName);

            saver.Add("Tick", tick, 0);

            return(saver);
        }
예제 #5
0
        public PartSaver OnSave()
        {
            var saver = new PartSaver(this, info.InternalName);

            if (beam != null)
            {
                saver.Add("BeamWeapon", beam.ID, -1);
            }

            saver.Add("PreparationTick", prep, 0);
            saver.Add(nameof(Reload), Reload, 0);

            if (target != null)
            {
                // TODO: also support actor targeting
                saver.Add("Target", target.Position + new CPos(0, 0, target.Height), CPos.Zero);
            }

            return(saver);
        }