예제 #1
0
        public virtual void Tick()
        {
            //decrement lockout count

            if (Thread != null)
            {
                Thread.TicksThisFrame = 0;
                Thread.Tick();
                if (SoundThreads.Count > 0) TickSounds();
            }
            if (Headline != null)
            {
                var over = HeadlineRenderer.Update();
                if (over)
                {
                    HeadlineRenderer.Dispose();
                    Headline = null;
                    HeadlineRenderer = null;
                }
                else if (UseWorld)
                {
                    WorldUI.Headline = HeadlineRenderer.DrawFrame(Thread.Context.World);
                }
            }
            if (UseWorld && Headline == null && WorldUI.Headline != null)
            {
                WorldUI.Headline = null;
            }
            if (ObjectData[(int)VMStackObjectVariable.LockoutCount] > 0) ObjectData[(int)VMStackObjectVariable.LockoutCount]--;
        }
예제 #2
0
        public virtual void LoadCrossRef(VMEntityMarshal input, VMContext context)
        {
            Contained = new VMEntity[input.Contained.Length];
            int i = 0;
            foreach (var item in input.Contained) Contained[i++] = context.VM.GetObjectById(item);

            Container = context.VM.GetObjectById(input.Container);
            if (UseWorld && Container != null)
            {
                WorldUI.Container = Container.WorldUI;
                WorldUI.ContainerSlot = ContainerSlot;
            }

            if (input.Headline != null)
            {
                Headline = new VMRuntimeHeadline(input.Headline, context);
                HeadlineRenderer = context.VM.Headline.Get(Headline);
            }
        }