Ejemplo n.º 1
0
	public void init(WeaponFeatures weaponFeatures)
	{
		m_Player = this.transform.GetComponent<Player> ();
		m_BouncePoints = new List<Vector3> ();
		m_BounceDirections = new List<Vector3> ();
		m_SpawnPoint = transform.Find ("SpawnPoint");
		m_Projectile = Resources.Load ("Prefab/Projectile/"+weaponFeatures.m_ProjectileName) as GameObject;
		m_WeaponFeatures = weaponFeatures;
		m_IsActive = true;

	}
Ejemplo n.º 2
0
 public WeaponFeatures(WeaponFeatures weaponFeatures)
 {
     m_WeaponName          = weaponFeatures.m_WeaponName;
     m_ProjectileName      = weaponFeatures.m_ProjectileName;
     m_EnergyCost          = weaponFeatures.m_EnergyCost;
     m_Damage              = weaponFeatures.m_Damage;
     m_ShotNumber          = weaponFeatures.m_ShotNumber;
     m_BounceNumber        = weaponFeatures.m_BounceNumber;
     m_CreditMultiplicator = weaponFeatures.m_CreditMultiplicator;
     m_IsPiercing          = weaponFeatures.m_IsPiercing;
     m_WeaponEffects       = new List <WeaponEffect>(weaponFeatures.m_WeaponEffects);
 }
Ejemplo n.º 3
0
 public void init(WeaponFeatures projectileFeatures, List <Vector3> bouncePoints, List <Vector3> bounceDirections)
 {
     m_RigidBody                 = transform.GetComponent <Rigidbody> ();
     m_RigidBody.velocity        = this.transform.forward * m_Speed;
     m_BouncePoints              = bouncePoints;
     m_BounceDirections          = bounceDirections;
     m_ProjectileFeatures        = new WeaponFeatures(projectileFeatures);
     m_PointIndex                = 0;
     m_DirectionIndex            = 0;
     nextBouncePoint             = m_BouncePoints [m_PointIndex];
     nextBounceDirection         = m_BounceDirections [m_DirectionIndex];
     m_LastDistanceBeforeDeflect = Mathf.Infinity;
     m_CreditMultiplicator       = 1;
 }