public virtual void RegisterEntityStates()
 {
     foreach (Type type in entityStateTypes)
     {
         entityStates.Add(new SerializableEntityStateType(type));
         //var typeName = type.FullName.Substring(type.FullName.LastIndexOf('.') + 1);
         //entityStateConfigs.Add(Assets.mainAssetBundle.LoadAsset<EntityStateConfiguration>(typeName));
         LogCore.LogI("Registered entitystate typename: " + entityStates[entityStates.Count - 1].typeName);
     }
 }
Beispiel #2
0
 /// <summary>
 /// Adds a GameObject to the master catalog and returns true
 /// GameObject must be non-null and have a CharacterMaster component
 /// returns false if GameObject is null or is missing the component
 /// </summary>
 /// <param name="master">The master to register to the master catalog.</param>
 /// <returns></returns>
 public static bool RegisterNewMaster(GameObject master)
 {
     if (master && master.HasComponent <CharacterMaster>())
     {
         EnigmaticThunder.Modules.Masters.RegisterMaster(master);
         LogCore.LogD("Registered master " + master.name + " to the master catalog!");
         return(true);
     }
     LogCore.LogF("FATAL ERROR: " + master.name + " failed to register to the master catalog!");
     return(false);
 }
Beispiel #3
0
 /// <summary>
 /// Adds a GameObject to the body catalog and returns true
 /// GameObject must be non-null and have a CharacterBody component
 /// returns false if GameObject is null or is missing the component
 /// </summary>
 /// <param name="bodyObject">The body to register to the body catalog.</param>
 /// <returns></returns>
 public static bool RegisterNewBody(GameObject bodyObject)
 {
     if (bodyObject)
     {
         EnigmaticThunder.Modules.Bodies.RegisterBody(bodyObject);// += list => list.Add(bodyObject);
         LogCore.LogD("Registered body " + bodyObject.name + " to the body catalog!");
         return(true);
     }
     LogCore.LogF("FATAL ERROR:" + bodyObject.name + " failed to register to the body catalog!");
     return(false);
 }
Beispiel #4
0
 /// <summary>
 /// Adds a GameObject to the projectile catalog and returns true
 /// GameObject must be non-null and have a ProjectileController component
 /// returns false if GameObject is null or is missing the component
 /// </summary>
 /// <param name="projectileObject">The projectile to register to the projectile catalog.</param>
 /// <returns></returns>
 public static bool RegisterNewProjectile(GameObject projectileObject)
 {
     if (projectileObject.HasComponent <ProjectileController>())
     {
         EnigmaticThunder.Modules.Projectiles.RegisterProjectile(projectileObject);
         LogCore.LogD("Registered projectile " + projectileObject.name + " to the projectile catalog!");
         return(true);
     }
     LogCore.LogF("FATAL ERROR:" + projectileObject.name + " failed to register to the projectile catalog!");
     return(false);
 }
Beispiel #5
0
 /// <summary>
 /// Destroys generic skill components attached to the survivor object and creates an empty SkillFamily.
 /// </summary>
 /// <param name="survivor"></param>
 public static void CreateEmptySkills(GameObject survivor)
 {
     if (survivor)
     {
         DestroyGenericSkillComponents(survivor);
         CreateEmptySkillFamily(survivor);
     }
     else
     {
         LogCore.LogF("Tried to create empty skills on a null GameObject!");
     }
 }
 public void SpawnCrystal(Vector3 position, Vector3 rotation)
 {
     for (int i = 0; i < crystals.Length; i++)
     {
         if (!crystals[i].hasCrystal)
         {
             LogCore.LogD("Spawning Imp Sorcerer Crystal");
             GameObject crystalFollower = Instantiate(crystalPrefab, position, Quaternion.Euler(rotation + new Vector3(90f, 0f)));
             crystalFollower.GetComponent <CrystalMotionManager>().referenceObject = crystals[i].crystalObject;
             NetworkServer.Spawn(crystalFollower);
             crystals[i].hasCrystal = true;
         }
     }
 }
        public void OnProjectileImpact(ProjectileImpactInfo info)
        {
            if (info.collider)
            {
                LogCore.LogW("Yes, it collided with collider");
                LogCore.LogW("HurtBox: " + info.collider.GetComponent <HurtBox>());
            }
            else
            {
                LogCore.LogW("Did not collide.");
            }
            LogCore.LogW("Point of collision: " + info.estimatedPointOfImpact);
            LogCore.LogW("Who gives a shit about this thing: " + info.estimatedImpactNormal);

            LogCore.LogW("component rotation :" + transform.eulerAngles);
        }
 public virtual void Create(ConfigFile config)
 {
     LogCore.LogI("h1");
     BuildConfig(config);
     LogCore.LogI("h2");
     RegisterEntityStates();
     LogCore.LogI("h3");
     ModifyAssets();
     LogCore.LogI("h4");
     ModifyPrefabs();
     LogCore.LogI("h5");
     RegisterPrefabs();
     LogCore.LogI("h6");
     LogCore.LogI("h7");
     LogCore.LogI("h8");
     LogCore.LogI("h9");
     ModifyDirectorCardOrHolder();
     LogCore.LogI("h10");
     CreateDirectorCard();
     LogCore.LogI("h11");
     Hook();
 }