예제 #1
0
        public static BackBullet AddBackBullet(BackBulletDescriptor Desc)
        {
            var Obj = CreateBullet(BulletType.Back, Desc.BaseBulletDesc.Position);

            var Entity = new BackBullet(Obj.transform, Desc);

            BulletList_.Add(Entity);

            return(Entity);
        }
예제 #2
0
        public BackBullet(Transform Trans, BackBulletDescriptor Desc)
            : base(Trans, BulletType.Back, Desc.BaseBulletDesc)
        {
            Distance_  = Desc.Distance;
            Direction_ = Desc.Direction;
            Speed_     = Desc.Speed;
            Size_      = Desc.Size;

            var Angle = MathHelper.GetUnityAngle(Direction_);

            Rotation = Quaternion.AngleAxis(Angle, Vector3.forward);

            Shape_ = new RectShape(Size_);
        }