Example #1
0
 public HealthModifiedInfo(global::Improbable.Gdk.Health.HealthModifier modifier, float healthBefore, float healthAfter, BlittableBool died)
 {
     Modifier     = modifier;
     HealthBefore = healthBefore;
     HealthAfter  = healthAfter;
     Died         = died;
 }
 /// <summary>
 /// creates a new CoreData
 /// </summary>
 /// <param name="name">Name of Entity</param>
 /// <param name="baseName">BaseName of Entity</param>
 /// <param name="transform">GameOject transform that the entity derives from</param>
 /// <param name="mesh">GameOject mesh that the entity derives from</param>
 public CoreData(ByteString30 name, ByteString30 baseName, Transform transform, Mesh mesh)
 {
     Name     = name;
     BaseName = baseName;
     if (transform != null && mesh != null)
     {
         try
         {
             scale   = transform.localScale;
             size    = mesh.bounds.size;
             isValid = true;
         }
         catch
         {
             Debug.LogWarning("CoreData: Unknown Exception");
             scale   = new float3();
             size    = new float3();
             isValid = false;
         }
     }
     else
     {
         Debug.LogWarning("CoreData: Failed to create CoreData, invalid transform or mesh");
         scale   = new float3();
         size    = new float3();
         isValid = false;
     }
 }
 /// <summary>
 /// Creates a new CoreData
 /// </summary>
 /// <param name="name">name of the Entity</param>
 /// <param name="baseName">base name of the Entity</param>
 /// <param name="go">GameObject (NOT PREFAB) that the Entity comes from</param>
 public CoreData(ByteString30 name, ByteString30 baseName, GameObject go)
 {
     Name     = name;
     BaseName = baseName;
     if (go != null)
     {
         try
         {
             scale   = go.GetComponent <Transform>().localScale;
             size    = go.GetComponent <MeshFilter>().sharedMesh.bounds.size;
             isValid = true;
         }
         catch
         {
             Debug.LogWarning("CoreData: Failed to generate CoreData due to a posibly null GoameObject, Transform, or MeshFilter");
             scale   = new float3();
             size    = new float3();
             isValid = false;
         }
     }
     else
     {
         scale   = new float3();
         size    = new float3();
         isValid = false;
     }
 }
 public EnviromentData(ByteString30 EntityName, int EntityId, int EntityParentId, ByteString30 EnviromentPath)
 {
     entityName     = EntityName;
     entityId       = EntityId;
     entityParentId = EntityParentId;
     pathString     = EnviromentPath;
     isValid        = true;
 }
 public EnviromentData(string EntityName, int EntityId, int EntityParentId, string EnviromentPath)
 {
     entityName     = new ByteString30(EntityName);
     entityId       = EntityId;
     entityParentId = EntityParentId;
     pathString     = new ByteString30(EnviromentPath);
     isValid        = true;
 }
 public Node(Point point, Point previous, float gCost, float hCost)
 {
     this.point    = point;
     this.previous = previous;
     this.gCost    = gCost;
     this.hCost    = hCost;
     valid         = true;
 }
 public CoreData(ByteString30 name, ByteString30 baseName, float3 mSize, float3 mScale)
 {
     Name     = name;
     BaseName = baseName;
     size     = mSize;
     scale    = mScale;
     isValid  = true;
 }
Example #8
0
        public                          BlittableBool[] ToArray(DynamicBuffer <BoolBufferElement> buffer)
        {
            BlittableBool[] array = new BlittableBool[buffer.Capacity];
            int             i     = 0;

            foreach (BoolBufferElement element in buffer)
            {
                array[i] = element.Value;
            }
            return(array);
        }
 public ExhaustiveSingularData(BlittableBool field1, float field2, byte[] field3, int field4, long field5, double field6, string field7, uint field8, ulong field9, int field10, long field11, uint field12, ulong field13, int field14, long field15, global::Improbable.Gdk.Core.EntityId field16, global::Improbable.Gdk.Tests.SomeType field17, global::Improbable.Gdk.Tests.SomeEnum field18)
 {
     Field1  = field1;
     Field2  = field2;
     Field3  = field3;
     Field4  = field4;
     Field5  = field5;
     Field6  = field6;
     Field7  = field7;
     Field8  = field8;
     Field9  = field9;
     Field10 = field10;
     Field11 = field11;
     Field12 = field12;
     Field13 = field13;
     Field14 = field14;
     Field15 = field15;
     Field16 = field16;
     Field17 = field17;
     Field18 = field18;
 }
Example #10
0
 private void AimingUpdated(BlittableBool isAiming)
 {
     // Inform the ScreenUIController of the aiming update.
     inGameScreenManager.SetPlayerAiming(isAiming);
 }
 private void OnAiming(BlittableBool isAiming)
 {
     fpsAnimator.SetAiming(isAiming);
 }
Example #12
0
 public FirstCommandResponse(BlittableBool response)
 {
     Response = response;
 }
Example #13
0
 public FirstEventPayload(BlittableBool field1, int field2)
 {
     Field1 = field1;
     Field2 = field2;
 }
 public EnviromentEntityData(CoreData cd)
 {
     coreData = cd;
     isValid  = true;
 }
 private void OnAimingChanged(BlittableBool _)
 {
     RecalculateFov();
 }