Ejemplo n.º 1
0
    public void Shot()
    {
        if (!ShotReady)
        {
            return;
        }
        ShotReady = false;
        float BulletSpeed = 5f;
        //
        var up  = logicobj.up;
        var obj = Prefabs.Bullet();

        obj.position = position + up / 2f;
        obj.angle    = logicobj.angle;
        obj.SpriteDrawer.PartActive = !Settings.PolyMode;
        obj.PolyRenderer.PartActive = Settings.PolyMode;
        obj.FastPhysics.Velocity    = up * BulletSpeed + FastPhysics.Velocity.magnitude * up.normalized;
    }