1 package org
.sevenchan
.dongs
.bodyparts
3 import flash
.net
.registerClassAlias
;
8 public class SexualPreference
10 registerClassAlias
("P_SexPref", SexualPreference
);
11 public static const STRAIGHT
:SexualPreference
= new SexualPreference
(true, false, "straight");
12 public static const GAY
:SexualPreference
= new SexualPreference
(false, true, "gay");
13 public static const BISEXUAL
:SexualPreference
= new SexualPreference
(true, true, "bi");
14 public static const ASEXUAL
:SexualPreference
= new SexualPreference
(false, false,"asexual");
16 public var label
:String = "";
17 public var likesOppositeSex
:Boolean;
18 public var likesSameSex
:Boolean;
19 public function SexualPreference
(opposite
:Boolean=false,same
:Boolean=false,lbl
:String="")
22 likesOppositeSex
= opposite
;
25 /** +-----------------+---+---+
27 * +-----------------+---+---+
28 * | Straight | F | T |
30 * | Bisexual | T | T |
32 * +-----------------+---+---+
34 public function likesGender
(me
:Gender
, target
:Gender
):Boolean {
35 var oppo
:Boolean = isOppositeGender
(me
, target
);
36 if (likesOppositeSex
&& oppo
)
38 if (likesSameSex
&& !oppo
)
43 public function isOppositeGender
(me
:Gender
, target
:Gender
):Boolean {