コード例 #1
0
    public override void Start()
    {
        dash      = GetComponent <Dash>();
        wallslide = GetComponent <Wallslide>();
        shoot     = GetComponent <Shoot>();

        base.Start();

        effectiveGravity = -(2 * maxJumpHeight) / Mathf.Pow(timeToJumpApex, 2);
        maxJumpVelocity  = Mathf.Abs(effectiveGravity) * timeToJumpApex;
        minJumpVelocity  = Mathf.Sqrt(2 * Mathf.Abs(effectiveGravity) * minJumpHeight);

        if (shoot)
        {
            shoot.CreateIcons();
        }
    }