Major refactor.

Core now formed and contains all useful utility to create custom ui with restrictions.
Many methods was extracted from different classes and moved to core.

Undo is now supported(because unity's undo bug seems to be fixed).

Example now moved into same level separate folder.
This commit is contained in:
TextusGames
2020-05-16 20:15:24 +03:00
parent f47dd5d350
commit eeaadfc569
65 changed files with 138 additions and 86 deletions

View File

@ -0,0 +1,3 @@
{
"name": "AmimalWorld"
}

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 6b7100eb7c609e2418517e5c25caaf2a
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b4a0269d5bc8b7345b6e2b1160c596db
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,42 @@
using System;
using UnityEngine;
[Serializable]
public class AnimalBase : IAnimal
{
[SerializeField] protected float age;
public GameObject food;
public virtual void Feed()
{
Debug.Log("Thanks");
}
}
[Serializable]
public class AnimalChild : AnimalBase {}
[Serializable]
public abstract class AnimalGrandChildAbstract : AnimalBase
{
public string someString;
}
[Serializable]
public class AbstractAnimalGrandChild : AnimalGrandChildAbstract {}
[Serializable]
public abstract class AbstractAnimal : IAnimal
{
[SerializeField] protected float age;
public GameObject food;
public virtual void Feed()
{
Debug.Log("Thanks");
}
}
[Serializable]
public class AbstractAnimalChild : AbstractAnimal {}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: c24236542320b8b438a9c637fc34365c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,4 @@
public interface IAnimal
{
void Feed();
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 5e7999ba5a7a8e941923ff9d8795fd59
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,7 @@
using System;
[Serializable]
public abstract class MammalBase : AnimalBase
{
public int numberOfBones;
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: b7dae106e8c3cf94198d8c1d0e9bce89
timeCreated: 1579584059