Ejemplo n.º 1
0
    void Awake()
    {
        anim       = TPGUIAnimation.Create();
        Scaledanim = TPGUIAnimation.Create();

        for (int i = 1; i < 7; i++)
        {
            TPAtlasTexture frame = TPackManager.getAtlas(Atlases.EXAMPLE).getPngTexture("fireball_000" + i.ToString());
            anim.addFrame(frame);
            Scaledanim.addFrame(frame);
        }

        anim.pos  = new Vector2(200, 200);
        anim.loop = true;
        anim.fps  = 25;
        anim.Play();

        Scaledanim.pos   = new Vector2(300, 200);
        Scaledanim.loop  = true;
        Scaledanim.fps   = 25;
        Scaledanim.scale = 0.5f;
        Scaledanim.Play();
    }
	void Awake() {
		anim	    =  TPGUIAnimation.Create();
		Scaledanim  =  TPGUIAnimation.Create();
		
		for(int i = 1; i < 7; i++) {
			TPAtlasTexture frame = TPackManager.getAtlas(Atlases.EXAMPLE).getPngTexture("fireball_000" + i.ToString());
			anim.addFrame(frame);
			Scaledanim.addFrame(frame);
		}
		
		anim.pos = new Vector2(200, 200);
		anim.loop = true;
		anim.fps = 25;
		anim.Play();
		
		Scaledanim.pos = new Vector2(300, 200);
		Scaledanim.loop = true;
		Scaledanim.fps = 25;
		Scaledanim.scale = 0.5f;
		Scaledanim.Play();
		
		
		
	}