예제 #1
0
 public void SetProjectile(SpellCreationSegment seg, ProjectileSpellBook sp)
 {
     spellSeg = seg;
     if (pm == null)
     {
         pm = gameObject.GetComponent <ProjectileMovement>();
     }
     pm.speed     = seg.GetSpeed();
     pm.turnSpeed = seg.GetTurnSpeed();
     spell        = sp;
     string[] layers = sp.layerMaskNames;
     foreach (Transform child in transform)
     {
         if (sp.source == ProjectileSpellBookBuilder.spellSource.enemy)
         {
             child.gameObject.layer = LayerMask.NameToLayer("ProjectileEnemy");
         }
         else if (sp.source == ProjectileSpellBookBuilder.spellSource.player)
         {
             child.gameObject.layer = LayerMask.NameToLayer("ProjectilePlayer");
         }
         else
         {
             child.gameObject.layer = LayerMask.NameToLayer("ProjectileNeutral");
         }
         child.gameObject.GetComponent <MovementCheck>().layerMask = LayerMask.GetMask(layers);
     }
 }
예제 #2
0
 public override void AdjustForSpeed(SpellCreationSegment seg)
 {
     amt = amt / seg.GetSpeed();
     return;
     //rotationAmt = rotationAmt / seg.GetTurnSpeed();
 }