当前位置: 首页>>代码示例>>C#>>正文


C# BThirdPerson类代码示例

本文整理汇总了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;
    }
开发者ID:FabianSchempp,项目名称:DUNDON,代码行数:31,代码来源:ControllStateKnight.cs

示例2: handleInput

    public override ControllState handleInput(BThirdPerson controller, CharacterStats stats)
    {
        if(controller.stateTime > 5.625){

        }
        return this;
    }
开发者ID:FabianSchempp,项目名称:DUNDON,代码行数:7,代码来源:ControllStateCrow.cs

示例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;
    }
开发者ID:FabianSchempp,项目名称:DUNDON,代码行数:28,代码来源:ControllStateZombie.cs

示例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);
     }
 }
开发者ID:FabianSchempp,项目名称:DUNDON,代码行数:11,代码来源:ControllerCrow.cs

示例5: handleTriggerStay

 public override ControllState handleTriggerStay(Collider collider, BThirdPerson controller, CharacterStats stats)
 {
     return this;
 }
开发者ID:FabianSchempp,项目名称:DUNDON,代码行数:4,代码来源:ControllStateKnight.cs

示例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;
 }
开发者ID:FabianSchempp,项目名称:DUNDON,代码行数:8,代码来源:ControllStateZombie.cs

示例7: Initialize

 protected void Initialize()
 {
     _BThirdPerson = gameObject.GetComponent<BThirdPerson>();
     _BThirdPersonMotionSystem = gameObject.GetComponent<BThirdPersonMotionSystem>();
     _BThirdPerson.controller = this;
     _BAudioPlayer = gameObject.GetComponent<BAudioPlayer>();
     material = renderer.material;
     setSlotsHand();
 }
开发者ID:FabianSchempp,项目名称:DUNDON,代码行数:9,代码来源:Controller.cs

示例8: handleCollissionEnter

 public override ControllState handleCollissionEnter(Collision collision, BThirdPerson controller, CharacterStats stats)
 {
     return this;
 }
开发者ID:FabianSchempp,项目名称:DUNDON,代码行数:4,代码来源:ControllStateKnight.cs

示例9: Start

 void Start()
 {
     controller = gameObject.GetComponent<BThirdPerson>();
 }
开发者ID:FabianSchempp,项目名称:DUNDON,代码行数:4,代码来源:BThirdPersonMotionSystem.cs


注:本文中的BThirdPerson类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。