void Start() { aimCam = GameObject.FindGameObjectWithTag("AimCamera").GetComponent <CinemachineVirtualCamera>(); lookAtTarget = GameObject.FindGameObjectWithTag("LookAtTarget").transform; gpc = GetComponent <GlobalPlayerController>(); dpc = GetComponent <DefaultPlayerController>(); isAiming = false; }
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(); } } }
// 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; }