public void Init() { state = RoleState.Falling; groundDct = GetComponent <GroundDetect>(); jumpProc = GetComponent <JumpProcess>(); jumpProc.init(); fallProc = GetComponent <FallProcess>(); slideProc = GetComponent <SlideProcess>(); moveProc = GetComponent <MoveProcess>(); moveProc.init(); }
public void Init() { ColliderSize = transform.Find("body").Find("collider").lossyScale; state = RoleState.Falling; groundDct = GetComponent <GroundDetect>(); jumpProc = GetComponent <JumpProcess>(); jumpProc.Init(); fallProc = GetComponent <FallProcess>(); slideProc = GetComponent <SlideProcess>(); moveProc = GetComponent <MoveProcess>(); moveProc.init(); cliffDct = GetComponent <CliffDetect>(); animator = GetComponent <AnimatorControl>(); }