Ejemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        Match3Controller = GameObject.Find("Match3Controller").GetComponent <Match3Controller> ();
        spriteRenderer   = gemstoneBg.GetComponent <SpriteRenderer> ();

        //spColor = spriteRenderer.color;
    }
Ejemplo n.º 2
0
    /*
     * public void OnMouseUp(){
     *      Debug.Log (this.rowIndex + " ," + this.columIndex);
     *      Match3Controller.MatchCheck (this);
     * }
     */
    public void Dispose()
    {
        //calculate scores here
        Destroy(this.gameObject);
        Destroy(gemstoneBg.gameObject);
        Match3Controller = null;

        ParticleToHeroEffects.instance.SpawnParticles(gameObject.transform);
    }
Ejemplo n.º 3
0
    void Start()
    {
        instance = this;

        priorSpawnInfo = new List <GemstoneType> ();

        gemstoneList    = new ArrayList();      //新建列表
        matchesGemstone = new ArrayList();
        Initialize();

        audi = this.gameObject.GetComponent <AudioSource> ();
    }
Ejemplo n.º 4
0
    void Start()
    {
        CreateSwipeGesture();
        CreateLongPressGesture();

        _fingerManager    = GameObject.FindGameObjectWithTag("FingerManager");
        _match3Controller = _fingerManager.GetComponent <Match3Controller>();
        _swipeController  = _fingerManager.GetComponent <SwipeController>();

        _balls = new List <GameObject>();
        _rb    = GetComponent <Rigidbody2D>();

        #if UNITY_EDITOR
        flickForce = 0.3f;
        #else
        flickForce = 0.03f;
        #endif
    }