Example #1
0
 public override void Setup(BulletFactory factory, GameObject targetObj) {
     mom = factory;
     targetPos = targetObj.transform.position + new Vector3(0, 1, 0);
     transform.LookAt(targetPos);
     myProcess = StartProcess();
     StartCoroutine(myProcess);
     Initialized = true;
 }
Example #2
0
 public override void Setup(BulletFactory mom, GameObject targetObj)
 {
     rigid                        = gameObject.AddComponent <Rigidbody>();
     rigid.useGravity             = false;
     rigid.collisionDetectionMode = CollisionDetectionMode.ContinuousDynamic;
     mother                       = mom;
     target                       = targetObj;
     rigid.velocity               = transform.forward * speed;
     Destroy(gameObject, 10f);
     Initialized = true;
 }
Example #3
0
 public override void Setup(BulletFactory mom, GameObject targetObj)
 {
     rigid                        = gameObject.AddComponent <Rigidbody>();
     rigid.useGravity             = false;
     rigid.collisionDetectionMode = CollisionDetectionMode.ContinuousDynamic;
     mother                       = mom;
     target                       = targetObj;
     transform.LookAt(targetObj.transform.position + new Vector3(0, 1, 0));
     rigid.velocity = transform.forward * speed;
     Initialized    = true;
 }
Example #4
0
 public abstract void Setup(BulletFactory mom, GameObject targetObj);