Пример #1
0
    private void spawnThing(ThingToSpawn subject)
    {
        GameObject newObj     = GameObject.Instantiate(subject.prefab, subject.position, new Quaternion(0, 0, 0, 0));
        _Vampire   spawnClass = newObj.GetComponent <_Vampire>();

        spawnClass.initialize(subject.waypoints, subject.dif);
    }
Пример #2
0
 public void initialize(List <WayPoint> points, _Vampire _baseClass, ThingToSpawn.difficulty difficulty)
 {
     allpoints = points;
     baseClass = _baseClass;
     if (difficulty == ThingToSpawn.difficulty.easy)
     {
         speed = 0.4f;
     }
     if (difficulty == ThingToSpawn.difficulty.med)
     {
         speed = 0.6f;
     }
     if (difficulty == ThingToSpawn.difficulty.hard)
     {
         speed = 0.8f;
     }
 }