本文整理汇总了C#中BThirdPerson类的典型用法代码示例。如果您正苦于以下问题:C# BThirdPerson类的具体用法?C# BThirdPerson怎么用?C# BThirdPerson使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BThirdPerson类属于命名空间,在下文中一共展示了BThirdPerson类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: handleInput
public override ControllState handleInput(BThirdPerson controller, CharacterStats stats)
{
Vector3 mousePoint = Vector3.zero;
stats.healthRegenerationRate = 0f;
stats.enduranceRegenerationRate = 0f;
if(controller.stateTime < 0.1){
controller.controller.slotRightHand.GetComponent<OWeapon>().enable();
shot = false;
Vector2 inputVector = new Vector2(Input.GetAxis("Horizontal"),Input.GetAxis("Vertical"));
Vector3 inputVectorTransformed = new Vector3(inputVector.x,0,-inputVector.y);
Vector3 lookTarget = controller.position + (ControllerCamera.hingeUp.transform.rotation*inputVectorTransformed);
controller.turn(lookTarget);
}
if(Input.GetButtonDown("attack") && stats.reduceEndurance(7) && !shot){
shot = true;
}
if(controller.stateTime > 0.22f){
if(shot){
return ControllerKnight._KnightATTACKB;
}
else{
controller.controller.slotRightHand.GetComponent<OWeapon>().disable();
return ControllerKnight._KnightIDLE;
}
}
return this;
}
示例2: handleInput
public override ControllState handleInput(BThirdPerson controller, CharacterStats stats)
{
if(controller.stateTime > 5.625){
}
return this;
}
示例3: handleInput
public override ControllState handleInput(BThirdPerson controller, CharacterStats stats)
{
Vector3 mousePoint = Vector3.zero;
stats.healthRegenerationRate = 0f;
stats.enduranceRegenerationRate = 0f;
if(controller.stateTime < 0.1){
controller.turnToReferenceObject();
controller.controller.slotRightHand.GetComponent<OWeapon>().enable();
shot = false;
}
if(Random.Range(1,10) < 3){
shot = true;
}
if(controller.stateTime > 0.22f){
if(shot){
return ControllerZombie._ZombieATTACKB;
}
else{
controller.controller.slotRightHand.GetComponent<OWeapon>().disable();
return ControllerZombie._ZombieIDLE;
}
}
return this;
}
示例4: onHit
public static void onHit(BThirdPerson controller, Collider collider, CharacterStats stats)
{
OStroke stroke = collider.gameObject.GetComponent<OStroke>();
if(stroke){
controller.hitBack(stroke.strokeForce, collider.gameObject);
stats.reduceHealthImpact(stroke.strength);
}
else{
stats.reduceHealthImpact(5f);
}
}
示例5: handleTriggerStay
public override ControllState handleTriggerStay(Collider collider, BThirdPerson controller, CharacterStats stats)
{
return this;
}
示例6: handleTriggerStay
public override ControllState handleTriggerStay(Collider collider, BThirdPerson controller, CharacterStats stats)
{
if(collider.tag == "Stroke"){
controller.controller.onHit(collider.GetComponent<OStroke>());
return ControllerZombie._ZombieGETHIT;
}
return this;
}
示例7: Initialize
protected void Initialize()
{
_BThirdPerson = gameObject.GetComponent<BThirdPerson>();
_BThirdPersonMotionSystem = gameObject.GetComponent<BThirdPersonMotionSystem>();
_BThirdPerson.controller = this;
_BAudioPlayer = gameObject.GetComponent<BAudioPlayer>();
material = renderer.material;
setSlotsHand();
}
示例8: handleCollissionEnter
public override ControllState handleCollissionEnter(Collision collision, BThirdPerson controller, CharacterStats stats)
{
return this;
}
示例9: Start
void Start()
{
controller = gameObject.GetComponent<BThirdPerson>();
}