Exemple #1
0
    private void Start()
    {
        if (GetComponent <InteractManager>() && GetComponent <PlayerFunctions>())
        {
            inputManager = InputController.Instance;
            gameManager  = HFPS_GameManager.Instance;
            floatingItem = FloatingIconManager.Instance;
            interact     = GetComponent <InteractManager>();
            pfunc        = GetComponent <PlayerFunctions>();
            paperUI      = gameManager.PaperTextUI;
            paperText    = gameManager.PaperReadText;
        }
        else
        {
            Debug.LogError("Missing one or more scripts in " + gameObject.name);
            return;
        }

        if (examineLight)
        {
            examineLight.enabled = false;
        }

        delay              = transform.root.gameObject.GetComponentInChildren <DelayEffect>();
        PlayerCam          = ScriptManager.Instance.MainCamera;
        ArmsCam            = ScriptManager.Instance.ArmsCamera;
        DefaultMainCamMask = ScriptManager.Instance.MainCamera.cullingMask;
        DefaultArmsCamMask = ArmsCam.cullingMask;
        pickupRange        = interact.RaycastRange;
    }
Exemple #2
0
    static void AddFloatingIcon()
    {
        if (Selection.gameObjects.Length > 0)
        {
            FloatingIconManager uIFloatingItem = FindObjectOfType <FloatingIconManager>();

            foreach (var obj in Selection.gameObjects)
            {
                uIFloatingItem.FloatingIcons.Add(obj);
            }

            EditorUtility.SetDirty(uIFloatingItem);
            Debug.Log("<color=green>" + Selection.gameObjects.Length + " objects are marked as Floating Icon</color>");
        }
        else
        {
            Debug.Log("<color=red>Please select one or more items which will be marked as Floating Icon</color>");
        }
    }