Exemplo n.º 1
0
        public TType Get <TType>() where TType : class
        {
            var item = BlackBoards.Components.OfType <TType>().FirstOrDefault();

            //?? StartingBlackBoardComponents.OfType<TType>().FirstOrDefault();
            return(item ?? EcsComponent.CreateObject(typeof(TType)) as TType);
        }
Exemplo n.º 2
0
 public static void TranslateWithTime(EcsComponent component, Vector3 direction)
 {
     component.transform.position += Time.deltaTime*direction;
 }
Exemplo n.º 3
0
 public static void Translate(EcsComponent component, float x, float y, float z)
 {
     component.transform.position += new Vector3(x, y, z);
 }