Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Spawning Controller Prefab with Matched Spline Prefab Using Pool Manager
#4
Also these are Curvy Spline and trigger scripts:
   
Code:
using UnityEngine;
using System.Collections;
using PathologicalGames;
using FluffyUnderware.Curvy.Controllers;

public class TriggerScript : MonoBehaviour {
   public Transform enemy;
   public FluffyUnderware.Curvy.CurvySpline curvySpline;
   private SplineController sc;
   private int count = 0;
   void OnTriggerEnter(Collider other)
   {
       Debug.Log("Triggered.");
       Enemy1Create();
   }

   void Enemy1Create()
   {
       sc = enemy.GetComponent<SplineController>();
       PoolManager.Pools["EnemyPool"].Spawn(enemy);
       sc.Spline = curvySpline;
       //Instantiate(enemy, Vector3.zero, Quaternion.identity);
       sc.Play();

       count++;
       if (count < 3)
           Invoke("Enemy1Create", 0.7f);
   }
}
Reply


Messages In This Thread
RE: Spawning Controller Prefab with Matched Spline Prefab Using Pool Manager - by Kerkenez - 03-25-2016, 09:36 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Best way to duplicate a spline with an offset Kapistijn 8 1,369 04-12-2026, 03:18 PM
Last Post: _Aka_
Smile Constant speed along a spline? tfishell 1 661 11-13-2025, 11:32 AM
Last Post: _Aka_
  SplineController Ignores Follow-Up and Chooses Wrong Spline Josenildo 7 4,464 07-29-2025, 09:15 PM
Last Post: _Aka_
  Curvy Line Renderer for UI Spline? gekido 7 6,237 07-13-2025, 07:11 PM
Last Post: _Aka_

Forum Jump: