Esempio 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);
        }
 public static void TranslateWithTime(EcsComponent component, Vector3 direction)
 {
     component.transform.position += Time.deltaTime*direction;
 }
 public static void Translate(EcsComponent component, float x, float y, float z)
 {
     component.transform.position += new Vector3(x, y, z);
 }