got racers animated and racing
This commit is contained in:
@@ -1,9 +1,27 @@
|
||||
using LuckerGame.Entities;
|
||||
using Sandbox;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
using System.Reflection.Metadata.Ecma335;
|
||||
|
||||
namespace Sandbox.Minigames.TerryRaces;
|
||||
|
||||
public class Racer : Pawn
|
||||
public class Racer : LuckerGame.Entities.Racer
|
||||
{
|
||||
public float Speed;
|
||||
public void ContinueRacing()
|
||||
{
|
||||
Position = Position.WithY( Position.y - Speed );
|
||||
SetAnimParameter( "move_x", Speed*500f );
|
||||
}
|
||||
|
||||
public void StopRacing()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void GenerateSpeed(Random random, double minSpeed, double maxSpeed)
|
||||
{
|
||||
Speed = (float)(RandomExtensions.NextDouble( random, minSpeed, maxSpeed ));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user