Exemplo n.º 1
0
 public void zako_init(ref Vector3 position, ref Quaternion rotation)
 {
     rigidbody_.init(ref position, ref rotation);
     collider_ = MyCollider.createEnemy();
     MyCollider.initSphereEnemy(collider_, ref rigidbody_.transform_.position_, 0.5f /* radius */);
     collider_homing_ = MyCollider.createEnemyHoming();
     MyCollider.initSphereEnemyHoming(collider_homing_, ref rigidbody_.transform_.position_, 5f /* radius */);
     enumerator_       = zako_act(); // この瞬間は実行されない
     on_update_        = new OnUpdateFunc(zako_update);
     on_render_update_ = new OnRenderUpdateFunc(zako_render_update);
     life_             = 50f;
 }
Exemplo n.º 2
0
 public void dragon_init(ref Vector3 position, ref Quaternion rotation)
 {
     rigidbody_.init(ref position, ref rotation);
     rigidbody_.setDamper(2f);
     rigidbody_.setRotateDamper(20f);
     collider_ = MyCollider.createEnemy();
     MyCollider.initSphereEnemy(collider_, ref position, 1.5f /* radius */);
     collider_homing_ = MyCollider.createEnemyHoming();
     MyCollider.initSphereEnemyHoming(collider_homing_, ref rigidbody_.transform_.position_, 5f /* radius */);
     enumerator_       = dragon_act(); // この瞬間は実行されない
     on_update_        = new OnUpdateFunc(dragon_update);
     on_render_update_ = new OnRenderUpdateFunc(dragon_render_update);
     life_             = 10000000f;
     dragon_           = dragon_pool_;
     dragon_.init(this, ref rigidbody_.transform_.position_, ref rigidbody_.transform_.rotation_);
 }
Exemplo n.º 3
0
 public void init(Task task,
                  int idx,
                  ref Vector3 position,
                  ref Quaternion rotation,
                  DrawBuffer.Type draw_type)
 {
     rigidbody_.init(ref position, ref rotation);
     rigidbody_.setRotateDamper(8);
     collider_ = MyCollider.createEnemy();
     MyCollider.initSphereEnemy(collider_, ref position, 1.5f /* radius */);
     collider_homing_ = MyCollider.createEnemyHoming();
     MyCollider.initSphereEnemyHoming(collider_homing_, ref rigidbody_.transform_.position_, 1.5f /* radius */);
     idx_     = idx;
     locator_ = (idx_ == 0 ?
                 new Vector3(0f, 0f, 0f) :
                 new Vector3(0f, 0f, -3f));
     draw_type_ = draw_type;
 }