示例#1
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_);
 }
示例#2
0
        public void dragon_init()
        {
            var position = new Vector3(-10f, -5f, 10f);

            rigidbody_.init(ref position, ref CV.QuaternionIdentity);
            rigidbody_.setDamper(2f);
            rigidbody_.setRotateDamper(20f);
            collider_ = MyCollider.createEnemy();
            MyCollider.initSphereEnemy(collider_, ref position, 1f /* radius */);
            lock_target_      = LockTarget.create(this, new LockTarget.CalcPosition(calc_lock_position_dragon));
            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_);
        }