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; }
public GravPaint(myMoveVars mv, Vector3 norm) : base(mv, norm) { dataValues.Vel = Vector3.zero; dataValues.gForce = -myNormal / 5; dataValues.hForce = .3f; dataValues.inAir = true; }
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); }
public CharacterBehavior(myMoveVars mv) { dataValues = mv; CurBehv = "none"; myPlayer = GameObject.Find("CubePlayer"); myChar = (Character)myPlayer.GetComponent(typeof(Character)); SetBehv(); }
public RedPaint(myMoveVars mv) : base(mv) { incAmount = 0.25f; dataValues.maxHAccel = 5.0f; }
public Hax(myMoveVars mv) : base(mv) { dataValues.hForce = 15.0f; }
public Run(myMoveVars mv) : base(mv) { dataValues.hForce = 3.0f; dataValues.maxHAccel = 10.0f; }
public Walk(myMoveVars mv) : this(mv, Vector3.up) { }
public CharacterBehavior(myMoveVars mv, Vector3 norm) : this(mv) { myNormal = norm; }