Search the source of every open source package.
7 results
using Sandbox;
using Sandbox.Citizen;
using System;
using System.Threading;
using System.Threading.Tasks;
public sealed class fixedPlayer : Component, Component.ITriggerListener
{
public float multyplier;
[Property] public GameObject cam;
[Property] public int jumps;
[Property] public int jumpsnow;
[Property] public CharacterController cc;
public void OnTriggerEnter(Collider other)
{
jumpsnow = 2;
}
protected override void OnStart()
{
this.Transform.LocalRotation = new Angles(0, 0, 0);
jumpsnow = jumps;
if (!IsProxy)
{
cam.Enabled = true;
}
}
protected override void OnUpdate()
{
//var cc = CharacterController;
if (IsProxy)
return;
if (Input.Down("Run"))
{
multyplier = 2f;
}
else
{
multyplier = 1;
}
if (jumpsnow > 0 && Input.Pressed("jump"))
{
jumpsnow = jumpsnow - 1;
Transform.Position += new Vector3(0, 0, 25);
}
if (!Input.AnalogMove.IsNearZeroLength)
{
Transform.Position += Input.AnalogMove.Normal * Time.Delta * 100.0f * multyplier;
}
/*
if (Input.Down("jump") && jumpnow > 0)
{
jumpnow = jumpnow - 1;
Transform.Position += new Vector3(0,0,5);
}
*/
/*if (Input.Down("jump"))
{
Transform.Position += new Vector3(0, 0, 5);
}
*/
if (Input.Down("reload"))
{
Transform.Rotation = new Angles(0, 0, 0);
}
}
}
using Sandbox;
public sealed class Camcontrol : Component
{
[Property] public GameObject cam;
private void OnStart()
{
cam.Transform.LocalPosition = new Vector3(-1000, 19, 575);
//cam.Transform.Rotation = new Rotation(45, 45, 45, 180);
}
}
using Sandbox;
public sealed class MyComponent : Component
{
[Property] public string StringProperty { get; set; }
protected override void OnUpdate()
{
}
}
using Sandbox;
public sealed class SexyLittleSlut : Component
{
protected override void OnUpdate()
{
Mouse.Visible = true;
}
}
global using Microsoft.AspNetCore.Components;
global using Microsoft.AspNetCore.Components.Rendering;
using Sandbox;
public sealed class Player : Component
{
public Angles LookInput;
protected override void OnUpdate()
{
// If we're a proxy then don't do any controls
// because this client isn't controlling us
if (IsProxy)
return;
// direction keys are pressed
if (!Input.AnalogMove.IsNearZeroLength)
{
Transform.Position += Input.AnalogMove.Normal * Time.Delta * 100.0f;
}
if (Input.Down("jump"))
{
Transform.Position += Vector3.Forward * Time.Delta;
}
// position the camera
var mouselook = Input.AnalogLook + 1;
mouselook = (mouselook + Input.AnalogLook);
var lookInput = (LookInput + Input.AnalogLook).Normal;
GameObject.Transform.Rotation = LookInput;
if(Input.Down("Run"))
{
Transform.Rotation = new Angles(0,90,0);
}
if (Input.Down("Duck"))
{
Transform.Rotation = new Angles(0, -90, 0);
}
}
}
global using static Sandbox.Internal.GlobalGameNamespace;
[assembly: global::System.Reflection.AssemblyMetadata( "AddonTitle", "Ponchik" )]
[assembly: global::System.Reflection.AssemblyMetadata( "AddonIdent", "ponchik" )]
[assembly: global::System.Reflection.AssemblyMetadata( "OrgIdent", "bananapeelsteam" )]
[assembly: global::System.Reflection.AssemblyMetadata( "Ident", "bananapeelsteam.ponchik" )]
[assembly: global::System.Reflection.AssemblyMetadata( "CompileTime", "10/16/2024 7:56:49 PM" )]
[assembly: global::System.Reflection.AssemblyMetadata( "EngineVersion", "17" )]
[assembly: global::System.Reflection.AssemblyMetadata( "EngineMinorVersion", "1" )]
[assembly: System.Runtime.Versioning.TargetFramework( ".NETCoreApp,Version=v7.0", FrameworkDisplayName = ".NET 7.0" )]
[assembly: global::System.Reflection.AssemblyVersion("0.0.107.0")]
[assembly: global::System.Reflection.AssemblyFileVersion("0.0.107.0")]