Ejemplo n.º 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();
    }
Ejemplo n.º 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);
    }
Ejemplo n.º 3
0
    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());
    }