示例#1
0
    void ThrowRock()
    {
        RockBeingTossed.transform.parent = null;

        Rock_AI RockAI = RockBeingTossed.GetComponent <Rock_AI>();

        RockAI.LaunchRock();
    }
示例#2
0
    void InstantiateRock()
    {
        RockBeingTossed = Instantiate(Rock, RockToInstantiateTo.transform.position, RockToInstantiateTo.transform.rotation, RockToInstantiateTo);
        RockBeingTossed.transform.position = new Vector3(0, 0, 0);

        Rock_AI RockAI = RockBeingTossed.GetComponent <Rock_AI>();

        RockAI.ParabolaRoot = ParabolaTransform.gameObject;

        RB = RockBeingTossed.GetComponent <Rigidbody>();
    }