public Attack_Shot04 (A_Fighter attackOwner, float preAttackPeriod = 0.0f, float attackPeriod = 0.0f, float animationDuration = 0.0f):base(attackPeriod,attackOwner) { base.attack_name=attack_name; //_--------------------------------- //HB_Instruction(attackOwner, keyframe, "hitbox Name", damage, radius, attackMechanic, Particle) // ********* this goes in attacks that inherit A_Attack HB_KeyFrame onOffTime; List<HB_KeyFrame> keyFrames; HB_Instruction hbInstruct; //JONATHAN'S ORIGINAL CODE this.preAttackPeriod = preAttackPeriod; this.attackPeriod = attackPeriod; this.animationDuration = animationDuration; this.postAttackPeriod = animationDuration - (preAttackPeriod + attackPeriod); // PROJECTILE ATTACK EXAMPLE // ************************************* keyFrames = new List<HB_KeyFrame>(); keyFrames.Add(new HB_KeyFrame(2.0f,8.0f)); //turn on, turn off keyframe //hbInstruct = new HB_Instruction(attackOwner,keyFrames,"P_MilkySpore",20.0f,1.5f,null,null); hbInstruct = new HB_Instruction(attackOwner,keyFrames,"P_MilkySpore",5.0f,1.5f,0.2f,new Vector3(1,0,0),new Vector3(0,5,0),2f,null,null); base.hb_instructions.Add(hbInstruct); }
public Amaterasu_QuakeWithFear(string animationName, A_Fighter attackOwner, float animationSpeed = 1.0f) : base(animationName, animationSpeed, attackOwner) { this.AddInstruction(new ProjectileHitBoxInstruction( "Amaterasu_projectile", // projectile name "l_ball_jnt", new Vector3(1.0f, 0.0f, 0.0f), // direction 10.0f, // speed attackOwner, // A_fighter 1.0f, // radius 1.0f, // damage 0.8f, // startTime 1.2f, // endTime new Vector3(0.0f, 0.0f, 0.0f), // offset new Vector3(0.0f, 0.0f, 0.0f) // movement )); this.AddInstruction(new ProjectileHitBoxInstruction( "Amaterasu_projectile", // projectile name "l_ball_jnt", new Vector3(1.0f, 0.0f, 0.0f), // direction 10.0f, // speed attackOwner, // A_fighter 1.0f, // radius 1.0f, // damage 1.1f, // startTime 1.3f, // endTime new Vector3(0.0f, 0.0f, 0.0f), // offset new Vector3(0.0f, 0.0f, 0.0f) // movement )); }
//diagonal head to ground stomp kick like public Amaterasu_SettingSun(string animationName, A_Fighter attackOwner, float animationSpeed = 1.0f) : base(animationName, animationSpeed, attackOwner) { this.AddInstruction(new JointHitBoxInstruction( "l_ball_jnt", attackOwner, // fighter 1.5f, // radius 5.0f, // damage 0.1f, // startTime 0.8f, // endTime new Vector3(0.0f, 0.0f, 0.0f), // offset new Vector3(0.0f, 0.0f, 0.0f), true )); this.AddInstruction(new JointHitBoxInstruction( "l_ball_jnt", attackOwner, // fighter 5f, // radius 7.0f, // damage 0.85f, // startTime 1.2f, // endTime new Vector3(0.0f, 0.0f, 0.0f), // offset new Vector3(0.0f, 0.0f, 0.0f), true )); }
//spinning low kick public Amaterasu_LightFlash(string animationName, A_Fighter attackOwner, float animationSpeed = 1.0f) : base(animationName, animationSpeed, attackOwner) { //JointHitBoxInstruction(joint,attackowner,radius,damage,starttime,endtime,offset,movement) //ProjectileHitBoxInstruction(projectilename,starting joint,direction,speed,attackowner,radius,damage,starttime,endtime,offset,movement this.AddInstruction(new JointHitBoxInstruction( "r_ball_jnt", //joint attackOwner, //fighter 2.0f, //radius 5.0f, //damage 0.2f, //start time 3.0f, //end time Vector3.zero, //offset Vector3.zero //movement )); this.AddInstruction(new ProjectileHitBoxInstruction( "Amaterasu_projectile", // projectile name "spine1_jnt", new Vector3(1.0f, 0.0f, 0.0f), // direction 10.0f, // speed attackOwner, // A_fighter 3.0f, // radius 1.0f, // damage 0.2f, // startTime 0.8f, // endTime new Vector3(-2.0f, -2.0f, 0.0f),// offset new Vector3(0.0f, 0.0f, 0.0f) // movement )); }
public Amaterasu_Backdraft(string animationName, A_Fighter attackOwner, float animationSpeed = 1.0f) : base(animationName, animationSpeed, attackOwner) { //range attack, range 1.5, speed med, size med, damage small this.AddInstruction(new ProjectileHitBoxInstruction( "Amaterasu_projectile", "l_ball_jnt", new Vector3(1,0,0), 7.0f, attackOwner, 1.0f, 1.0f, 1.0f, 1.5f, Vector3.zero, Vector3.zero)); //empty hitbox to cause slide back at start of animation, rather than projectile at spawn. this.AddInstruction(new JointHitBoxInstruction( "r_ball_jnt", attackOwner, 0.0f, 0.0f, 0.0f, 0.1f, Vector3.zero, new Vector3(-0.1f,0.0f,0.0f))); }
public Attack_coldShoulder (A_Fighter attackOwner, float preAttackPeriod = 0.0f, float attackPeriod = 0.0f, float animationDuration = 0.0f):base(attackPeriod,attackOwner) { base.attack_name=attack_name; //_--------------------------------- //HB_Instruction(attackOwner, keyframe, "hitbox Name", damage, radius, attackMechanic, Particle) // ********* this goes in attacks that inherit A_Attack HB_KeyFrame onOffTime; List<HB_KeyFrame> keyFrames; HB_Instruction hbInstruct; // Right Fist keyFrames = new List<HB_KeyFrame>(); keyFrames.Add(new HB_KeyFrame(0.35f,1.8f)); hbInstruct = new HB_Instruction(attackOwner,keyFrames,"HB_Fist_R",20.0f,0.8f,null,null); base.hb_instructions.Add(hbInstruct); ///Left Fist keyFrames = new List<HB_KeyFrame>(); keyFrames.Add(new HB_KeyFrame(0.35f,1.8f)); hbInstruct = new HB_Instruction(attackOwner,keyFrames,"HB_Fist_L",20.0f,0.8f,null,null); base.hb_instructions.Add(hbInstruct); //JONATHAN'S ORIGINAL CODE this.preAttackPeriod = preAttackPeriod; this.attackPeriod = attackPeriod; this.animationDuration = animationDuration; this.postAttackPeriod = animationDuration - (preAttackPeriod + attackPeriod); }
public void RestartFighter(){ string fighterName = "Fighter_" + this.Fighter.name; GameObject.Destroy( this.fighter.gobj ); this.fighter = null; //Hieu commented out, so when players hit restart, they can reselect fighter //GameManager.CreateFighter( fighterName, this.playerNumber ); }
public ProjectileHitBoxInstruction( string projectileName, string startJoint, Vector3 direction, float speed, A_Fighter fighter, float radius, float damage, float startTime, float endTime, Vector3 offset = default(Vector3), Vector3 movement = default(Vector3)) : base(fighter, radius, damage, startTime, endTime, movement){ float timePeriod = (endTime - startTime); this.projectileName = projectileName; this.startJoint = fighter.joints[startJoint]; this.increment = direction.normalized * speed * (Time.deltaTime); this.offset = offset; this.speed = speed; this.knockback = Vector3.left; }
public A_Buff ( float duration, A_Fighter attackOwner, string name, float chargeTime ) { this.timer = 0.0f; this.duration = duration; this.activated = false; this.attackOwner = attackOwner; this.name = name; this.chargeTime = chargeTime; }
protected A_HitBoxInstruction(A_Fighter fighter, float radius, float damage, float startTime, float endTime, Vector3 movement, bool canKnockDown = false){ this.fighter = fighter; this.startTime = startTime; this.endTime = endTime; this.radius = radius; this.damage = damage; this.started = false; this.movement = movement; this.canKnockDown = canKnockDown; }
public Attack_None(A_Fighter attackOwner, float preAttackPeriod, float attackPeriod, float animationDuration):base(attackPeriod,attackOwner) { base.attack_name = attack_name; this.preAttackPeriod = preAttackPeriod; this.attackPeriod = attackPeriod; this.animationDuration = animationDuration; this.postAttackPeriod = animationDuration - (preAttackPeriod + attackPeriod); }
public Heavy_NapalmFlameThrower(string animationName, A_Fighter attackOwner, float animationSpeed = 1.0f) : base(animationName, animationSpeed, attackOwner) { this.AddInstruction(new ProjectileHitBoxInstruction( "Heavy_projectile", // projectile name "l_wrist_jnt", // starting joint new Vector3(1.0f, 0.0f, 0.0f), // direction 0.5f, // speed attackOwner, // A_fighter 1.0f, // radius 1.0f, // damage 0.4f, // startTime 1.6f, // endTime new Vector3(-1.2f, 0.0f, 0.0f), // offset new Vector3(0.0f, 0.0f, 0.0f) // movement )); this.AddInstruction(new ProjectileHitBoxInstruction( "Heavy_projectile", // projectile name "l_wrist_jnt", // starting joint new Vector3(1.0f, 0.0f, 0.0f), // direction 0.5f, // speed attackOwner, // A_fighter 1.0f, // radius 1.0f, // damage 0.4f, // startTime 1.6f, // endTime new Vector3(-1.8f, 0.4f, 0.0f), // offset new Vector3(0.0f, 0.0f, 0.0f) // movement )); this.AddInstruction(new ProjectileHitBoxInstruction( "Heavy_projectile", // projectile name "l_wrist_jnt", // starting joint new Vector3(1.0f, 0.0f, 0.0f), // direction 0.5f, // speed attackOwner, // A_fighter 1.0f, // radius 1.0f, // damage 0.5f, // startTime 1.6f, // endTime new Vector3(-2.4f, 0.0f, 0.0f), // offset new Vector3(0.0f, 0.0f, 0.0f) // movement )); this.AddInstruction(new ProjectileHitBoxInstruction( "Heavy_projectile", // projectile name "l_wrist_jnt", // starting joint new Vector3(1.0f, -0.4f, 0.0f), // direction 0.5f, // speed attackOwner, // A_fighter 2.0f, // radius 1.0f, // damage 0.5f, // startTime 1.6f, // endTime new Vector3(-3.0f, 0.6f, 0.0f), // offset new Vector3(0.0f, 0.0f, 0.0f) // movement )); }
public HitBox(A_Fighter attackOwner, GameObject gobj, bool isProjectile) { this.attackOwner = attackOwner; this.gobj = gobj; this.isProjectile = isProjectile; this.inUse = false; this.damage = 0.0f; this.knockback = Vector3.left; this.canKnockDown = false; this.Reset(); }
protected A_Attack( string animationName, float speed, A_Fighter attackOwner) { this.speed = speed; this.attackOwner = attackOwner; this.timer = 0.0f; this.animationName = animationName; this.instructions = new List<A_HitBoxInstruction>(); if (attackOwner.gobj.animation.GetClip(animationName) != null){ this.length = attackOwner.gobj.animation[animationName].clip.length; } }
public Amaterasu_SpinningHookKick(string animationName, A_Fighter attackOwner, float animationSpeed = 1.0f) : base(animationName, animationSpeed, attackOwner) { this.AddInstruction(new JointHitBoxInstruction( "r_ball_jnt", attackOwner, // fighter 3.0f, // radius 2.0f, // damage 0.7f, // startTime 1.0f, // endTime new Vector3(0.0f, 0.0f, 0.0f), // offset new Vector3(0.05f, 0.0f, 0.0f) )); }
public Heavy_MegatonPunch(string animationName, A_Fighter attackOwner, float animationSpeed = 1.0f) : base(animationName, animationSpeed, attackOwner) { this.AddInstruction(new JointHitBoxInstruction( "r_wrist_jnt", // joint attackOwner, // fighter 5.0f, // radius 3.0f, // damage 1.5f, // startTime 2.3f, // endTime new Vector3(1.0f, 0.0f, -3.0f), // offset new Vector3(0.2f, 0.0f, 0.0f), // extraMovement true // knockdown )); }
//knee kick public Amaterasu_DawnFirstLight(string animationName, A_Fighter attackOwner, float animationSpeed = 1.0f) : base(animationName, animationSpeed, attackOwner) { this.AddInstruction(new JointHitBoxInstruction( "r_knee_jnt", attackOwner, // fighter 1.5f, // radius 1.5f, // damage 0.3f, // startTime 1.0f, // endTime new Vector3(0.0f, 0.0f, 0.0f), // offset new Vector3(0.05f, 0.0f, 0.0f) )); }
public Heavy_ColdShoulder(string animationName, A_Fighter attackOwner, float animationSpeed = 1.0f) : base(animationName, animationSpeed, attackOwner) { this.AddInstruction(new JointHitBoxInstruction( "l_elbow_jnt", // joint attackOwner, // fighter 5.0f, // radius 4.0f, // damage 0.7f, // startTime 1.6f, // endTime new Vector3(0.0f, 0.0f, 0.0f), // offset new Vector3(0.5f, 0.0f, 0.0f), // movement true // canKnockDown )); }
public Heavy_123Fire(string animationName, A_Fighter attackOwner, float animationSpeed = 1.0f) : base(animationName, animationSpeed, attackOwner) { this.AddInstruction(new ProjectileHitBoxInstruction( "Heavy_projectile", // projectile name "head_jnt", // starting joint new Vector3(1.0f, 0.0f, 0.0f), // direction 10.0f, // speed attackOwner, // A_fighter 1.0f, // radius 1.0f, // damage 0.1f, // startTime 5.0f, // endTime new Vector3(2.0f, 0.0f, 0.0f), // offset new Vector3(0.0f, 0.0f, 0.0f) // movement )); this.AddInstruction(new ProjectileHitBoxInstruction( "Heavy_projectile", // projectile name "head_jnt", // starting joint new Vector3(1.0f, 0.0f, 0.0f), // direction 10.0f, // speed attackOwner, // A_fighter 1.0f, // radius 1.0f, // damage 0.8f, // startTime 5.0f, // endTime new Vector3(2.0f, 0.0f, 0.0f), // offset new Vector3(0.0f, 0.0f, 0.0f) // movement )); this.AddInstruction(new ProjectileHitBoxInstruction( "Heavy_projectile", // projectile name "head_jnt", // starting joint new Vector3(1.0f, 0.0f, 0.0f), // direction 10.0f, // speed attackOwner, // A_fighter 1.5f, // radius 3.0f, // damage 1.6f, // startTime 5.0f, // endTime new Vector3(2.0f, 0.5f, 0.0f), // offset new Vector3(0.0f, 0.0f, 0.0f) // movement )); //move back on each shot fired for short duration this.AddInstruction(new JointHitBoxInstruction("head_jnt", attackOwner, 0.0f, 0.0f, 0.1f, 0.4f, Vector3.zero, new Vector3(-0.01f,0.0f,0.0f))); this.AddInstruction(new JointHitBoxInstruction("head_jnt", attackOwner, 0.0f, 0.0f, 0.8f, 1.2f, Vector3.zero, new Vector3(-0.01f,0.0f,0.0f))); this.AddInstruction(new JointHitBoxInstruction("head_jnt", attackOwner, 0.0f, 0.0f, 1.8f, 2.0f, Vector3.zero, new Vector3(-0.2f,0.0f,0.0f))); }
//non projectile public HB_Instruction(A_Fighter owner, List<HB_KeyFrame> onOffTimes, string jointName, float damage, float radius, Mechanic attackMechanic = null, ParticleSystem p = null) { this.owner = owner; this.onOffTimes = onOffTimes; this.jointName = jointName; this.damage = damage; this. radius = radius; this.attackMechanic = attackMechanic; this.particleSystem = particleSystem; this.projectileSpeed = 0.0f; this.projectileStartLocation = Vector3.zero; this.projectileDirection = Vector3.zero; }
public Heavy_HeatSeeker(string animationName, A_Fighter attackOwner, float animationSpeed = 1.0f) : base(animationName, animationSpeed, attackOwner) { this.AddInstruction(new ProjectileHitBoxInstruction( "Heavy_projectile_seek", // projectile name "r_shoulder_jnt", // starting joint new Vector3(0.75f, .75f, 0.0f), // direction 7.0f, // speed attackOwner, // A_fighter 2.0f, // radius 3.0f, // damage 0.7f, // startTime 5.0f, // endTime new Vector3(0.0f, 0.0f, 0.0f), // offset new Vector3(0.0f, 0.0f, 0.0f) // movement )); }
public Heavy_Railgun(string animationName, A_Fighter attackOwner, float animationSpeed = 1.0f) : base(animationName, animationSpeed, attackOwner) { this.AddInstruction(new ProjectileHitBoxInstruction( "Heavy_projectile", // projectile name "head_jnt", // starting joint new Vector3(1.0f, 0.0f, 0.0f), // direction 20.0f, // speed attackOwner, // A_fighter 4.5f, // radius 4.0f, // damage 3.0f, // startTime 8.0f, // endTime new Vector3(-3.0f, 1.2f, 0.0f), // offset new Vector3(0.0f, 0.0f, 0.0f) // movement )); this.AddInstruction(new ProjectileHitBoxInstruction( "Heavy_projectile", // projectile name "head_jnt", // starting joint new Vector3(1.0f, 0.0f, 0.0f), // direction 20.0f, // speed attackOwner, // A_fighter 4.5f, // radius 4.0f, // damage 3.2f, // startTime 8.0f, // endTime new Vector3(-3.0f, 0.0f, 0.0f), // offset new Vector3(0.0f, 0.0f, 0.0f) // movement )); this.AddInstruction(new ProjectileHitBoxInstruction( "Heavy_projectile", // projectile name "head_jnt", // starting joint new Vector3(1.0f, 0.0f, 0.0f), // direction 20.0f, // speed attackOwner, // A_fighter 4.5f, // radius 4.0f, // damage 3.4f, // startTime 8.0f, // endTime new Vector3(-3.0f, 0.0f, 0.0f), // offset new Vector3(0.0f, 0.0f, 0.0f) // movement )); }
public Heavy_FireCarpet(string animationName, A_Fighter attackOwner, float animationSpeed = 1.0f) : base(animationName, animationSpeed, attackOwner) { //this.instructions.Add(new ProjectileHitBoxInstruction( "MilkySpore", "r_wrist_jnt", new Vector3(1.0f, 0.0f, 0.0f), 10.0f, attackOwner, 2.0f, 10.0f, 0.7f, 2.0f )); //this.instructions.Add(new ProjectileHitBoxInstruction( "Projectile_Cube", "r_wrist_jnt", new Vector3(1.0f, 0.0f, 0.0f), 10.0f, attackOwner, 2.0f, 10.0f, 0.9f, 2.2f )); //this.instructions.Add(new ProjectileHitBoxInstruction( "Projectile_Cube", "r_wrist_jnt", new Vector3(1.0f, 0.0f, 0.0f), 10.0f, attackOwner, 2.0f, 10.0f, 1.1f, 2.4f )); this.AddInstruction(new ProjectileHitBoxInstruction( "Heavy_projectile", // projectile name "r_wrist_jnt", // starting joint new Vector3(1.0f, 0.0f, 0.0f), // direction 10.0f, // speed attackOwner, // A_fighter 2.0f, // radius 3.0f, // damage 0.8f, // startTime 5.0f, // endTime new Vector3(2.0f, 0.0f, 0.0f), // offset new Vector3(-0.15f, 0.0f, 0.0f) // movement )); }
public void InstantiateFighter(string fighter, Vector3 position, Quaternion rotation){ GameObject character = GameObject.Instantiate( Resources.Load("Fighters/" + fighter, typeof(GameObject)), position, rotation ) as GameObject; Vector3 localScale = this.playerNumber == 1 ? character.transform.localScale : new Vector3(-character.transform.localScale.x, character.transform.localScale.y, character.transform.localScale.z); character.transform.localScale = localScale; switch (fighter){ case "Fighter_Odin": this.fighter = new Fighter_Odin(character, this.playerNumber); break; case "Fighter_Heavy": this.fighter = new Fighter_Heavy(character, this.playerNumber); break; case "Fighter_Amaterasu": this.fighter = new Fighter_Amaterasu(character,this.playerNumber); break; default: break; } }
public Heavy_TriplePunch(string animationName, A_Fighter attackOwner, float animationSpeed = 1.0f) : base(animationName, animationSpeed, attackOwner) { this.AddInstruction(new JointHitBoxInstruction( "l_wrist_jnt", // joint attackOwner, // fighter 3.0f, // radius 2.0f, // damage 0.1f, // startTime 0.5f, // endTime Vector3.zero, // offset new Vector3( 0.005f, 0, 0 ) // movement )); this.AddInstruction(new JointHitBoxInstruction( "r_wrist_jnt", // joint attackOwner, // fighter 3.0f, // radius 2.0f, // damage 1.0f, // startTime 1.4f, // endTime Vector3.zero, // offset new Vector3( 0.005f, 0, 0 ) // movement )); }
public Attack_Mixed (string animationName, float animationSpeed, A_Fighter attackOwner) : base (animationName, animationSpeed, attackOwner) { }
public JointHitBoxInstruction( string joint, A_Fighter fighter, float radius, float damage, float startTime, float endTime, Vector3 offset = default(Vector3), Vector3 movement = default(Vector3), bool canKnockDown = false) : base(fighter, radius, damage, startTime, endTime, movement,canKnockDown){ this.joint = fighter.joints[joint]; this.offset = offset; this.knockback = Vector3.left; }
public Attack_SelfBuff (string animationName, float animationSpeed, A_Fighter attackOwner) : base (animationName, animationSpeed, attackOwner) { this.activated = false; }
public Player (int playerNumber) { this.playerNumber = playerNumber; this.controls = new GamePad(this); this.fighter = null; }
public void SelectFighter( A_Fighter fighter ){}