예제 #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));
                }
            }
        }