Begin script abstraction

This commit is contained in:
hydrant
2020-02-29 14:50:10 +01:00
parent 447dd2eabc
commit 37f499a446
48 changed files with 2201 additions and 49 deletions

View File

@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Text;
using ReallifeGamemode.Server.Core.API;
namespace ReallifeGamemode.Server.Core.RageMP
{
public class RageColShape : RageEntity, IColShape
{
private GTANetworkAPI.ColShape colShape;
public RageColShape(GTANetworkAPI.ColShape colShape) : base(colShape)
{
this.colShape = colShape;
this.colShape.OnEntityEnterColShape += (c, p) => OnEntityEnter?.Invoke(this, new RagePlayer(p));
this.colShape.OnEntityExitColShape += (c, p) => OnEntityExit?.Invoke(this, new RagePlayer(p));
}
public event IColShape.ColShapeEvent OnEntityEnter;
public event IColShape.ColShapeEvent OnEntityExit;
}
}