Beispiel #1
0
    // Use this for initialization
    void Start()
    {
        this.m_Model = this.gameObject.transform.parent.gameObject.GetComponent <VGameModel> ();

        this.m_v2RealMapSize = GlobalManager.Instance.MapSize;
        this.m_v2MinimapSize = this.MapBg.GetComponent <RectTransform> ().sizeDelta;
        this.m_v2MinimapSize = new Vector2(this.m_v2MinimapSize.y, this.m_v2MinimapSize.x);

        SignalManager.Instance.AddHandler(SignalID.ShipParamChanged, this.SetPointPos);
        SignalManager.Instance.AddHandler(SignalID.GameView_ControlChanged, this.SetPointShape);
    }
Beispiel #2
0
    // Use this for initialization
    void Start()
    {
        this.m_Model        = this.gameObject.GetComponent <VGameModel> ();
        this.m_ChooBtnWidth = this.pf_ChooseShipToggle.GetComponent <RectTransform> ().sizeDelta.x;

        Btn_Setting.onClick.AddListener(delegate {
            ShowSettingPanel();
        });

        Btn_ClearTrack.onClick.AddListener(delegate {
            DrawManager.Instance.ClearTrack(this.m_Model.GetControlledShipID());
        });

        Sd_Progress.onValueChanged.AddListener(delegate {
            if (Mathf.Abs(Sd_Progress.value - this.m_LastValue) > 0.05)
            {
                VideoManager.Instance.SetCurrentIndex(Sd_Progress.value);
            }
            this.m_LastValue = Sd_Progress.value;
        });
    }
Beispiel #3
0
 void Start()
 {
     this.m_Model = this.gameObject.transform.parent.parent.gameObject.GetComponent <VGameModel> ();
     SignalManager.Instance.AddHandler(SignalID.ShipParamChanged, this.ShowParam);
     SignalManager.Instance.AddHandler(SignalID.SetTime, this.SetTime);
 }