Exemple #1
0
        public BluePaint(myMoveVars mv, Vector3 norm) : base(mv, norm)
        {
            CurBehv = "BluePaint";

//			Debug.Log("PrevVel: " + dataValues.PrevVel);
            //Debug.Log("VelMag: " + dataValues.PrevVel.magnitude);
            //Debug.Log("RevMag: " + dataValues.PrevVel.magnitude);
            if (!InputManager.GetKey("Mod2"))
            {
                if (dataValues.PrevVel.magnitude < 20)
                {
                    dataValues.Vel = norm * 20;
                }
                else
                {
                    //Debug.Log("2");
                    //dataValues.Vel = Vector3.Reflect(new Vector3(dataValues.Vel.x, dataValues.PrevVel.y, dataValues.Vel.z), myNormal.normalized);

                    // 0.99f is a cheatsy hack. It seems to stop the jump height from increasing and decreasing
                    dataValues.Vel = Vector3.Reflect(dataValues.PrevVel.normalized, norm.normalized) * (dataValues.PrevVel.magnitude + 0.981f);
                }

                if (InputManager.GetKey("Mod3"))
                {
                    dataValues.Vel += dataValues.jForce * myNormal / 2;
                }

                dataValues.inAir = true;
            }
            //Debug.Log("RevMag: " + dataValues.Vel.magnitude);
            dataValues.PrevVel = Vector3.zero;
        }
Exemple #2
0
 public GravPaint(myMoveVars mv, Vector3 norm) : base(mv, norm)
 {
     dataValues.Vel    = Vector3.zero;
     dataValues.gForce = -myNormal / 5;
     dataValues.hForce = .3f;
     dataValues.inAir  = true;
 }
Exemple #3
0
 public Walk(myMoveVars mv, Vector3 norm) : base(mv, norm)
 {
     CurBehv              = "Walk";
     dataValues.hForce    = 1.0f;
     dataValues.maxHAccel = 5.0f;
     dataValues.gForce    = new Vector3(0.0f, 0.6333f, 0.0f);
 }
Exemple #4
0
        public CharacterBehavior(myMoveVars mv)
        {
            dataValues = mv;
            CurBehv    = "none";
            myPlayer   = GameObject.Find("CubePlayer");
            myChar     = (Character)myPlayer.GetComponent(typeof(Character));

            SetBehv();
        }
Exemple #5
0
 public RedPaint(myMoveVars mv) : base(mv)
 {
     incAmount            = 0.25f;
     dataValues.maxHAccel = 5.0f;
 }
Exemple #6
0
 public Hax(myMoveVars mv) : base(mv)
 {
     dataValues.hForce = 15.0f;
 }
Exemple #7
0
 public Run(myMoveVars mv) : base(mv)
 {
     dataValues.hForce    = 3.0f;
     dataValues.maxHAccel = 10.0f;
 }
Exemple #8
0
 public Walk(myMoveVars mv)
     : this(mv, Vector3.up)
 {
 }
Exemple #9
0
 public CharacterBehavior(myMoveVars mv, Vector3 norm)
     : this(mv)
 {
     myNormal = norm;
 }