示例#1
0
 void Start()
 {
     aimCam       = GameObject.FindGameObjectWithTag("AimCamera").GetComponent <CinemachineVirtualCamera>();
     lookAtTarget = GameObject.FindGameObjectWithTag("LookAtTarget").transform;
     gpc          = GetComponent <GlobalPlayerController>();
     dpc          = GetComponent <DefaultPlayerController>();
     isAiming     = false;
 }
示例#2
0
 public void OnMobHeadJump(Mob m)
 {
     if (HasController())
     {
         DefaultPlayerController con = controllerStack.Peek() as DefaultPlayerController;
         if (con != null)
         {
             if (m is PiranhaPlant && (m as PiranhaPlant).state == 0)
             {
                 return;
             }
             con.DoMobKillPushback();
         }
     }
 }
示例#3
0
 // Start is called before the first frame update
 void Awake()
 {
     isGrounded = false;
     health = GetComponent<PlayerHealth>();
     rb = GetComponent<Rigidbody>();
     defaultPlayerController = GetComponent<DefaultPlayerController>();
     wallPlayerController = GetComponent<WallPlayerController>();
     grindPlayerController = GetComponent<GrindPlayerController>();
     input = GetComponent<InputController>();
     cc = GetComponent<CapsuleCollider>();
     recentAction = RecentActionType.None;
     currentJumps = 0;
     currentDashes = 0;
     isResetCRRunning = false;
     angleOfNearestWall = 0f;
 }