コード例 #1
0
        protected override void WatchTickAction()
        {
            Building thing = (Building)base.TargetA.Thing;

            // Todo: add try-catch (TryGetComp?) in case another mod adds a new tv type
            RimFlix.CompScreen screen = thing.GetComp <RimFlix.CompScreen>();
            screen.SleepTimer = 10;

            base.WatchTickAction();
        }
コード例 #2
0
        protected override void WatchTickAction()
        {
            Building thing = (Building)base.TargetA.Thing;

            RimFlix.CompScreen screen = thing.TryGetComp <RimFlix.CompScreen>();
            if (screen != null)
            {
                screen.SleepTimer = 10;
            }

            base.WatchTickAction();
        }