//Fire a water projectile where the player is aiming, slows down the player it collides with. public static Active Soak(PlayerScript owner) { Active returnActive = new Active(20.0f, 5.0f); returnActive.ActiveClassification = Active.ActiveType.Soak; //Instantiate the projectile here. returnActive.PrepareProjectiles(1, owner); return returnActive; }
//Create a rectangular strip oriented with the player's beam that speeds up any objects that cross it. public static Active Slipstream(PlayerScript owner) { Active returnActive = new Active(20.0f, 5.0f); returnActive.ActiveClassification = Active.ActiveType.SlipGel; returnActive.PrepareProjectiles(3, owner); return returnActive; }
//Create a rectangular strip along the player's beam that slows down objects that cross it. public static Active Slowstream(PlayerScript owner) { Active returnActive = new Active(20.0f, 5.0f); returnActive.ActiveClassification = Active.ActiveType.SlowGel; //Instantiate the Slowstream object here. returnActive.PrepareProjectiles(3, owner); return returnActive; }
//Create a zone at the end of the player's beam, zone pulls in objs. public static Active GravityField(PlayerScript owner) { Active returnActive = new Active(20.0f, 5.0f); returnActive.ActiveClassification = Active.ActiveType.GravField; //float distance = 1.0f; //Instantiate a Gravity Field Zone object here. //TODO: Replace with a projectile, travels a short distance before spawning a grav field. returnActive.PrepareProjectiles(1, owner); /* Vector3 objectPos = owner.gameObject.transform.position + (owner.PlayerBeam.transform.right * distance); GameObject gravField = GameObject.Instantiate(Resources.Load<GameObject>("Prefabs/Actives/GravField"), objectPos, Quaternion.identity) as GameObject; gravField.transform.FindChild("GravField_Anim").GetComponent<GravFieldScript>().GravFieldActive = returnActive; //Tie necessary Active info to the object's script. returnActive.Duration.OnTimerComplete += gravField.transform.FindChild("GravField_Anim").GetComponent<GravFieldScript>().Despawn;*/ return returnActive; }