public VariableIdentityTypeAssetProvider(string name, PlatformColor variableIdentityColor) : base( typeof(PlatformFrameworkResourceKey), "Resources/Reference", variableIdentityColor, name) { _variableIdentityColor = variableIdentityColor; }
public void initializeColor(PlatformColor platColor) { colColor = platColor; var tempMaterial = new Material(gameObject.GetComponent <MeshRenderer>().sharedMaterial); tempMaterial.color = ColumnColors[(int)colColor]; gameObject.GetComponent <MeshRenderer>().sharedMaterial = tempMaterial; }
public override void Die() { var pos = new Vector3Int(Mathf.RoundToInt(transform.position.x), Mathf.RoundToInt(transform.position.y), Mathf.RoundToInt(transform.position.z)); for (int i = pos.x - 1; i <= pos.x + 1; i++) { for (int j = pos.z - 1; j <= pos.z + 1; j++) { var platform = PlatformController.FindPlatformAt(new Vector3Int(i, pos.y, j)); if (platform) { platform.Lower(); } } } PlatformColor.UpdateAllColors(); Destroy(gameObject); }
public void burnColor() { colColor = PlatformColor.Touched; gameObject.GetComponent <MeshRenderer>().sharedMaterial.color = ColumnColors[(int)colColor]; }