public override TextureAnimation GenerateIdleAnimation() { var idle_ani = new TextureAnimation(this.Factory.LoadUnitTexture("zombie"), 1, 1); idle_ani.Frames = Enumerable.Range(1, 1).ToArray(); idle_ani.FrameRepeats = Enumerable.Repeat<int>(50, 1).ToArray(); return idle_ani; }
public override TextureAnimation GenerateIdleAnimation() { TextureAnimation ani; Texture tex; tex = Factory.LoadUnitTexture("archer_idle"); ani = new TextureAnimation(tex, 6, 4); ani.Frames = Enumerable.Range(1, 21).ToArray(); ani.FrameRepeats = Enumerable.Repeat<int>(4, 21).ToArray(); return ani; }
protected override void PrepareUnitAnimations() { TextureAnimation ani; Texture tex; tex = Factory.LoadUnitTexture("archer_walking"); ani = new TextureAnimation(tex, 4, 3); ani.Frames = Enumerable.Range(1, 12).ToArray(); ani.FrameRepeats = Enumerable.Repeat<int>(2, 12).ToArray(); this.SetUnitAnimation(StandardUnitAnimations.Move, ani); }
public override TextureAnimation GenerateIdleAnimation() { TextureAnimation ani; Texture tex; tex = Factory.LoadHeroTexture("wizard_idle"); ani = new TextureAnimation(tex, 6, 5); ani.Frames = Enumerable.Range(1, 30).ToArray(); ani.FrameRepeats = Enumerable.Repeat<int>(3, 30).ToArray(); return ani; }
protected override void Prepare() { var effect = Factory.Create1by1Sprite(); effect.transform.position = Factory.ConvertPos(Spell.Controller.Hero.PositionAs<TilePosition>().Point, 0.8f); ParallelAnimation parallelani = new ParallelAnimation(); TextureAnimation texani = new TextureAnimation(this.Factory.LoadSpellTexture("inspiration"), 5, 3); texani.Frames = Enumerable.Range(1, 15).ToArray(); texani.FrameRepeats = new int[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; parallelani.Add(texani, true); SizeChangeAnimation sizeani = new SizeChangeAnimation(0.02f); parallelani.Add(sizeani, false); this.EnqueueAnimation(effect, parallelani); }
protected virtual GameObjectAnimation GenerateDeathAnimation() { var seq_ani = new SequenceAnimation(); var death_ani = new TextureAnimation(this.Factory.LoadUnitTexture("death_default"), 5, 3); death_ani.Frames = Enumerable.Range(1, 15).ToArray(); death_ani.FrameRepeats = Enumerable.Repeat<int>(2, 15).ToArray(); seq_ani.AddAnimation(death_ani); var dead_ani = new TextureAnimation(this.Factory.LoadUnitTexture("death_default"), 5, 3); dead_ani.Frames = new int[] { 15 }; dead_ani.FrameRepeats = Enumerable.Repeat<int>(2, 1).ToArray(); dead_ani.AutoLooping = true; seq_ani.AddAnimation(dead_ani); return seq_ani; }
protected override void Prepare() { var effect = Factory.Create1by1Sprite(); float size = 0.4f; effect.transform.localScale = new UnityEngine.Vector3(size, size, size); var terrain = (TerrainEntity)Spell.Targets[0][0]; var toPos = Factory.ConvertPos(terrain.PositionAs<TilePosition>().Point, 0.8f); effect.transform.position = toPos; ParallelAnimation parallelani = new ParallelAnimation(); TextureAnimation texani = new TextureAnimation(this.Factory.LoadSpellTexture("raise_dead"), 5, 6); texani.Frames = Enumerable.Range(1, 30).ToArray(); texani.FrameRepeats = Enumerable.Repeat<int>(1, 30).ToArray(); parallelani.Add(texani, true); SizeChangeAnimation sizeani = new SizeChangeAnimation(0.02f); parallelani.Add(sizeani, false); this.EnqueueAnimation(effect, parallelani); }
protected virtual GameObjectAnimation GenerateDeathAnimation() { var seq_ani = new SequenceAnimation(); var death_ani = new TextureAnimation(this.Factory.LoadUnitTexture("death_default"), 5, 3); death_ani.Frames = Enumerable.Range(1, 15).ToArray(); death_ani.FrameRepeats = Enumerable.Repeat <int>(2, 15).ToArray(); seq_ani.AddAnimation(death_ani); var dead_ani = new TextureAnimation(this.Factory.LoadUnitTexture("death_default"), 5, 3); dead_ani.Frames = new int[] { 15 }; dead_ani.FrameRepeats = Enumerable.Repeat <int>(2, 1).ToArray(); dead_ani.AutoLooping = true; seq_ani.AddAnimation(dead_ani); return(seq_ani); }
protected override void Prepare() { var effect = Factory.Create1by1Sprite(); float size = 0.3f; effect.transform.localScale = new UnityEngine.Vector3(size, size, size); var target = ((XmasEntity)Spell.Targets[0][0]); var pos = Factory.ConvertPos(target.PositionAs<TilePosition>().Point, 0.8f); pos.y += 0.5f; effect.transform.position = pos; ParallelAnimation parallelani = new ParallelAnimation(); TextureAnimation texani = new TextureAnimation(this.Factory.LoadSpellTexture("lightningbolt"), 5, 5); texani.Frames = Enumerable.Range(1, 20).ToArray(); texani.FrameRepeats = new int[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; parallelani.Add(texani, true); SizeChangeAnimation sizeani = new SizeChangeAnimation(0.02f); parallelani.Add(sizeani, false); this.EnqueueAnimation(effect, parallelani); }