コード例 #1
0
ファイル: Rigid.cs プロジェクト: hippogyz/mc_unity
    //for test
    //public bool isCollision;
    //public GameObject[] otherCollider;

    void Start()
    {
        //velocity = Vector3.zero;
        trans             = GetComponent <Transform>();
        collisionDetector = GetComponentInChildren <CollisionDetector>();
        testGround        = GetComponentInChildren <TestGround>();
        onGround          = OnGround();
        innerFixedTime    = 0;
    }
コード例 #2
0
    public bool OnGround()
    {
        TestGround testGround = characterCollider.GetComponent <TestGround>();

        bool result = testGround.OnGround();

        result = result && !(rigid.velocity.y > 0.1f);

        return(result);
    }