本文整理匯總了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>();
}