示例#1
0
        public static Shell CreateShell(this ShellType shellType, Vector position)
        {
            var shell = shellType.CreateShell();

            shell.Position = position;
            return(shell);
        }
示例#2
0
        public static Shell CreateShell(this ShellType shellType, Vector position, Vector direction)
        {
            var shell = shellType.CreateShell(position);

            shell.Direction = direction;
            return(shell);
        }
示例#3
0
文件: Hero.cs 项目: AlexM4Q/Rover
        public override void Update()
        {
            base.Update();

            if (IsFire)
            {
                var now = DateTime.Now.Ticks;
                if (now - _lastFireTicks > FireDelayTicks)
                {
                    _lastFireTicks = now;
                    World.AddEntity(ShellType.CreateShell(Position, Angular));
                }
            }
        }