Code: Select all
[EntityClassAttribute](string name="", string category="Game", string helper=null, string icon="prompt.bmp", bool hide=false)
Code: Select all
(string name="", string category="Game", string helper=null, string icon="prompt.bmp", bool hide=false)
Code: Select all
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CryEngine;
namespace CryEngine.Projects.Game
{
[EntityClass]
[EntityClassAttribute](string name="", string category = "Game", string helper = null, string icon = "prompt.bmp", bool hide = false)
class playerEntity : EntityComponent
{
float _mass;
string _geometry;
public float Mass
{
get { return _mass; }
set
{
_mass = value;
resetEntity();
}
}
[EntityProperty(EntityPropertyType.Geometry)]
public string Geometry
{
get { return _geometry; }
set
{
_geometry = value;
resetEntity();
}
}
private void resetEntity()
{
Entity.LoadGeometry(0, _geometry);
Entity.Physics.Physicalize(_mass, PhysicalizationType.Rigid);
}
}
}