Example #1
0
    // Start is called before the first frame update
    void Start()
    {
        uimanager = ((UIManager)GameObject.Find("UIManager").GetComponent(typeof(UIManager)));

        if (gameObject.transform.childCount > 0)
        {
            ps  = (ParticleSystem)gameObject.transform.GetChild(0).GetComponent(typeof(ParticleSystem));
            psr = ((ParticleSystemRenderer)gameObject.transform.GetChild(0).GetComponent(typeof(ParticleSystemRenderer)));
        }

        br = (Renderer)gameObject.GetComponent(typeof(Renderer));

        BlockBreaker blockbreaker = (BlockBreaker)GameObject.Find("BlockBreaker").GetComponent(typeof(BlockBreaker));

        brick_sound = blockbreaker.brick_sound;
        coin_sound  = blockbreaker.coin_sound;
        hitblock    = blockbreaker.hitblock;
        coin_anim   = blockbreaker.coin_anim;
        debris      = blockbreaker.debris;


        if (blocktype == BlockType.Kaizo)
        {
            change_opacity(0f);
        }
    }
Example #2
0
 private void Start()
 {
     world  = World.instance;
     player = world.Player.transform;
     bb     = world.Player.GetComponent <BlockBreaker>();
 }