Skip to content

Fix Platforms #26

@Cdev-git

Description

@Cdev-git
public static GameObject platl;
public static GameObject platr;
public static void PlatformMod()

{
    
    if (ControllerInputPoller.instance.leftGrab && leftplat == null)
    {
        leftplat = CreatePlatformOnHand(GorillaTagger.Instance.leftHandTransform);
        ColorChanger colorChanger = leftplat.AddComponent<ColorChanger>();
        colorChanger.colors = StupidTemplate.Settings.backgroundColor;
    }

    if (ControllerInputPoller.instance.rightGrab && rightplat == null)
    {
        rightplat = CreatePlatformOnHand(GorillaTagger.Instance.rightHandTransform);
        ColorChanger colorChanger = rightplat.AddComponent<ColorChanger>();
        colorChanger.colors = StupidTemplate.Settings.backgroundColor;
    }

    if (ControllerInputPoller.instance.rightGrabRelease && rightplat != null)
    {
        rightplat.Disable();
        rightplat = null;

    }

    if (ControllerInputPoller.instance.leftGrabRelease && leftplat != null)
    {
        leftplat.Disable();
        leftplat = null;
    }
}
private static GameObject leftplat = null;
private static GameObject rightplat = null;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions