Beispiel #1
0
 private void Start()
 {
     CameraTransform = new ComRef <Transform>(() =>
     {
         return(Camera.main.transform);
     });
 }
Beispiel #2
0
    static void Main()
    {
        Type excelAppType = Type.GetTypeFromProgID("Excel.Application");

        using (var comRef = new ComRef <object>(Activator.CreateInstance(excelAppType)))
        {
            var excel = comRef.Reference;
            // ...
            excel.GetType().InvokeMember("Quit", BindingFlags.InvokeMethod, null, excel, null);
        }
    }
Beispiel #3
0
    private void Awake()
    {
        if (DirectionIndicatorObjectPrefab == null)
        {
            return;
        }

        DirectionIndicatorObject = Instantiate(DirectionIndicatorObjectPrefab);
        DirectionIndicatorObject.transform.localScale = new Vector3(0.2f, 0.2f, 0.2f);

        InitTargetGameobject();

        cameraTransform = new ComRef <Transform>(() =>
        {
            return(Camera.main.transform);
        });
    }
 public void InitPanel()
 {
     _Panel = new ComRef <GameObject>(() =>
     {
         if (SpeechManager.Instance.IsNetworkScene)
         {
             return(GameObject.Find("GeneralUI/UI(Clone)/Panel"));
         }
         else
         {
             return(GameObject.Find("UI/Panel"));
         }
     });
     if (_Panel.Ref != null)
     {
         _Panel.Ref.SetActive(false);
     }
 }
    private void Start()
    {
        taralongCollider = GetComponent <BoxCollider>();
        if (!taralongCollider)
        {
            enabled = false;
            Debug.LogError("NO_BOXCOLLIDER_ON_TAGALONG_OBJ");
        }

        cameraTransform = new ComRef <Transform>(() =>
        {
            return(Camera.main.transform);
        });

        interpolatpor = gameObject.AddComponent <Interpolator>();
        interpolatpor.SmoothLerpToTarget      = true;
        interpolatpor.SmoothPositionLerpRatio = 0.75f;
        interpolatpor.PositionPerSecond       = 3.0f;

        gameObject.AddComponent <Billboard>();
    }