Fix hair, dick around with new game screen.
[18plus-7leafadventure.git] / src / org / sevenchan / dongs / bodyparts / SexualPreference.as
blob42fc0b7e40fcace3d70924d96888c2b7718075bb
1 package org.sevenchan.dongs.bodyparts
3 import flash.net.registerClassAlias;
4 /**
5 * ...
6 * @author Harbinger
7 */
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="")
21 this.label = lbl;
22 likesOppositeSex = opposite;
23 likesSameSex = same;
25 /** +-----------------+---+---+
26 * | SexPref | S | O |
27 * +-----------------+---+---+
28 * | Straight | F | T |
29 * | Gay | T | F |
30 * | Bisexual | T | T |
31 * | ASexual | F | F |
32 * +-----------------+---+---+
34 public function likesGender(me:Gender, target:Gender):Boolean {
35 var oppo:Boolean = isOppositeGender(me, target);
36 if (likesOppositeSex && oppo)
37 return true;
38 if (likesSameSex && !oppo)
39 return true;
40 return false;
43 public function isOppositeGender(me:Gender, target:Gender):Boolean {
44 switch(me) {
45 case Gender.ASEXUAL:
46 return true;
47 break;
48 case Gender.FEMALE:
49 switch(target) {
50 case Gender.MALE:
51 return true;
52 case Gender.FEMALE:
53 return false;
55 break;
56 case Gender.HERM:
57 return true;
58 break;
59 case Gender.MALE:
60 switch(target) {
61 case Gender.FEMALE:
62 return true;
63 case Gender.MALE:
64 return false;
66 break;
68 return true;