コード例 #1
0
        public void Tick(Actor self)
        {
            if (--ticks <= 0)
            {
                var position = self.CenterPosition;
                if (position.Z > 0 && self.GetDamageState() >= DamageState.Heavy &&
                    !self.World.FogObscures(new CPos(position)))
                {
                    var offset = info.Offset.Rotate(coords.QuantizeOrientation(self, self.Orientation));
                    var pos    = PPos.FromWPosHackZ(position + coords.LocalToWorld(offset));
                    self.World.AddFrameEndTask(w => w.Add(new Smoke(w, pos, info.Sprite)));
                }

                ticks = info.Interval;
            }
        }
コード例 #2
0
ファイル: Contrail.cs プロジェクト: watsoncui/OpenRA
        public void Tick(Actor self)
        {
            var local = info.Offset.Rotate(coords.QuantizeOrientation(self, self.Orientation));

            history.Tick(self.CenterPosition + coords.LocalToWorld(local));
        }