initial file creation
This commit is contained in:
16
code/EntityComponents/Lucker/Cameras/FixedCamera.cs
Normal file
16
code/EntityComponents/Lucker/Cameras/FixedCamera.cs
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
using Sandbox;
|
||||||
|
|
||||||
|
namespace LuckerGame.Components.Lucker.Cameras;
|
||||||
|
|
||||||
|
public partial class FixedCamera : AbstractCamera, ISingletonComponent
|
||||||
|
{
|
||||||
|
public override void BuildInput()
|
||||||
|
{
|
||||||
|
throw new System.NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void UpdateCameraParameters()
|
||||||
|
{
|
||||||
|
throw new System.NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
50
code/Minigames/TerryRaces/TerryRacesMinigame.cs
Normal file
50
code/Minigames/TerryRaces/TerryRacesMinigame.cs
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Numerics;
|
||||||
|
using LuckerGame.Components.Lucker.Cameras;
|
||||||
|
using LuckerGame.Components.Pawn;
|
||||||
|
using LuckerGame.Entities;
|
||||||
|
using Sandbox;
|
||||||
|
using Sandbox.UI;
|
||||||
|
|
||||||
|
namespace LuckerGame.Minigames.TerryRaces;
|
||||||
|
|
||||||
|
[Library( "mg_terry_races" )]
|
||||||
|
public class TerryRaces : Minigame
|
||||||
|
{
|
||||||
|
public override string Name => "Terry Races";
|
||||||
|
private List<Lucker> Players { get; set; }
|
||||||
|
|
||||||
|
public override void Initialize( List<Lucker> players )
|
||||||
|
{
|
||||||
|
Players = players;
|
||||||
|
// Setup cameras for players
|
||||||
|
Players.ForEach( player =>
|
||||||
|
{
|
||||||
|
player.Components.Create<RTSCamera>();
|
||||||
|
} );
|
||||||
|
|
||||||
|
Players.Select( ( player, i ) => (Player: player, Index: i) ).ToList().ForEach( pair =>
|
||||||
|
{
|
||||||
|
var player = pair.Player;
|
||||||
|
var index = pair.Index;
|
||||||
|
var pawn = new Pawn();
|
||||||
|
pawn.Name = player.Name;
|
||||||
|
pawn.Tags.Add( "victim" );
|
||||||
|
pawn.Health = 1;
|
||||||
|
player.Pawn = pawn;
|
||||||
|
pawn.DressFromClient( player.Client );
|
||||||
|
|
||||||
|
} );
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Tick()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Cleanup()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user