public override void OnInit() { objectFeature = Entity.GetFeature <ObjectFeature>(); playerTransform = objectFeature.GetComponent <PlayerTransform>(); RegisterUpdate(OnUpdate); RegisterFixedUpdate(OnFixedUpdate); // 初始化Last lastPosition = objectFeature.transform.position; lastRotation = objectFeature.transform.rotation; }
public override void OnInit() { objectFeature = Entity.GetFeature <ObjectFeature>(); swordCollision = objectFeature.GetComponent <SwordCollision>(); RegisterMessage(MessageID.PlayerAttack, (IBody body) => { if (debug) { Debug.Log("message start attack"); } AttackStart(body as UintBody); }); }