Class: Yuki::Animation::ParticleOnSpriteRandom

Inherits:
Command show all
Defined in:
docs/5_Battle_20_MoveAnimation.rb

Overview

Place a particle on a sprite randomly

Instance Attribute Summary

Attributes inherited from TimedAnimation

#begin_time, #end_time, #time_source

Attributes included from Yuki::AnimationMixin

#player, #resolver

Instance Method Summary collapse

Methods inherited from Command

#duration, #start, #update

Methods inherited from TimedAnimation

#done?, #duration, #parallel_add, #play_before, #start, #update

Methods included from Yuki::AnimationMixin

#begin_offset_for_next_animation, #done?, #duration, #start, #update

Constructor Details

#initialize(particle, on, proportion_x = 1, proportion_y = 1) ⇒ ParticleOnSpriteRandom

Create a new ParticleOnSpriteRandom

Parameters:

  • particle (Sprite, Sprite3D) —

    sprite that will be placed

  • on (PokemonSprite, PokemonSprite3D) —

    based on which Sprite dimension it will be placed

  • proportion_x (Float) (defaults to: 1) —

    proportion of the sprite width that will cover (by default 1)

  • proportion_y (Float) (defaults to: 1) —

    proportion of the sprite height that will cover (by default 1)



293
294
# File 'docs/5_Battle_20_MoveAnimation.rb', line 293

def initialize(particle, on, proportion_x = 1, proportion_y = 1)
end