Exemple #1
0
 // The instance the pointer end has made contact with another collider
 void OnTriggerEnter(Collider col)
 {
     // Pull any UI components that are possible
     assemblyLineSpace = col.transform.GetComponent <AssemblyLineSwitch>();
     playSpace         = col.transform.GetComponent <PlayspaceSwitch>();
     level             = col.transform.GetComponent <Level>();
 }
Exemple #2
0
    // This method is called when the player presses on the "changing playspace adjustment"
    // to move the playspace closer or away from the assembly line
    public void FlipHandControls(PlayspaceSwitch x)
    {
        changingSpace = !changingSpace;

        // Change playspace siwtch materials to match current state
        if (changingSpace)
        {
            x.Highlight();

            // Revert the other switch as obsolete so you do not control both as once
            changingLine = false;
            assemblyLineSwitch.Reset();
        }
        else
        {
            x.Reset();
        }
    }