public override void BindEntity(Entity *entityPtr) { if (entityPtr == null) { throw new Exception("BindViewError: EntityPtr should not be null"); } _ptr = (BoidTarget *)entityPtr; _cloneEntity = *_ptr; _Instance = this; }
private int _GetOffsetOfBoidTarget_Tag() { var tempObj = new BoidTarget(); BoidTarget *ptr = &tempObj; var filedPtr = &(ptr->Tag); return((int)((long)filedPtr - (long)ptr)); }
public override void DoUpdate(float deltaTime) { _cloneEntity = *_ptr; UpdatePosRot(ref _cloneEntity.Transform); }