示例#1
0
    public void OnTriggerEnter1(Collider col)
    {
        Destroyable destoyable = col.gameObject.GetComponent <Destroyable>();

        if (destoyable != null)
        {
            destoyable.OnCollisionObject(transform);
            library.score.AddScoreForDestroy(destoyable);
            library.energy.AddEnergy(destoyable);

            EZCameraShake.CameraShakeInstance c = EZCameraShake.CameraShaker.Instance.ShakeOnce(2, 4, 0.1f, 2f);


            AddDestroyable(destoyable.GetType().Name);
        }

        Letter letter = col.gameObject.GetComponent <Letter>();

        if (letter != null)
        {
            WordRide wordRide = library.level.GetComponentInChildren <WordRide>();

            if (wordRide != null)
            {
                wordRide.CheckLetter(letter.letterNum);
            }

            Destroy(letter.gameObject);
        }

        //   c.PositionInfluence = new Vector3(1,1,1);
        // c.PositionInfluence = new Vector3(1, 1, 1);
    }