예제 #1
0
    float SwapDis = .1f;//切换距离
    #endregion

    void Start()
    {
        Instance = this;
        mTran = transform;
        Muzzle = mTran.Find("Muzzle");
        Position = Camera.main.WorldToScreenPoint(mTran.position);
        Path = new RayPath();
    }
예제 #2
0
    void Start()
    {
        Cannon = CannonCtl.Instance;

        UITran = transform.Find("Main");
        //切换泡泡
        UIEventListener.Get(UITran.Find("BtnSwap").gameObject).onClick = sender => Cannon.SwapBubble();
        //控制炮口
        UIEventListener.Get(UITran.Find("CannonArea").gameObject).onPress = (sender, isPress) => Cannon.ControlMuzzle(isPress);
    }
예제 #3
0
파일: GSM.cs 프로젝트: JingChen1988/Bubble
    void Start()
    {
        Instance = this;
        SlotTable = SlotTable.Instance;
        CannonCtl = CannonCtl.Instance;
        //忽略碰撞
        Physics2D.IgnoreLayerCollision(Layer.Bubble, Layer.BubbleFall);
        Physics2D.IgnoreLayerCollision(Layer.Bubble, Layer.Ground);
        Physics2D.IgnoreLayerCollision(Layer.BubbleFall, Layer.BubbleFall);

        StartCoroutine(SlotTable.ShowTable());
    }