コード例 #1
0
    public void Compute()
    {
        StoneBehaviour spawn = Instantiate <StoneBehaviour>(blueStone);

        spawn.transform.position = transform.position + new Vector3(-21.0315f, 0.55f, 0f); //This is where the hack is relative to the center of the sheet
        spawn.transform.rotation = Quaternion.identity;
        spawn.initialSpeed       = searchPosition.x;
        spawn.initialAngle       = searchPosition.y;
        spawn.inTurn             = turn;
        stones.Add(spawn);

        foreach (StoneBehaviour s in stones)
        {
            s.inPlay = true;
        }
        spawn.Throw();
        thrown = true;
    }
コード例 #2
0
    public void TrowRock()
    {
        if (computing)
        {
            ResetSheet();
        }
        StoneBehaviour spawn = Instantiate <StoneBehaviour>(blueStone);

        spawn.transform.position = transform.position + new Vector3(-21.0315f, 0.5f, 0f); //This is where the hack is relative to the center of the sheet
        spawn.transform.rotation = Quaternion.identity;
        spawn.initialSpeed       = initialSpeed;
        spawn.initialAngle       = initialAngle;
        spawn.inTurn             = turn;
        spawn.name = "ShowcaseThrown";
        stones.Add(spawn);

        foreach (StoneBehaviour s in stones)
        {
            s.inPlay = true;
        }
        spawn.Throw();
        thrown = true;
    }