This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# MIT License | |
# | |
# Copyright (c) 2018, Zane Claes | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# MIT License | |
# | |
# Copyright (c) 2018, Zane Claes | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# MIT License | |
# | |
# Copyright (c) 2018, Zane Claes | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// I created a shared base-class for both CreatureRenderer and CreatureCanvasRenderer, which removes tons and tons of copy/pasted code... | |
// Here's how I transform the vertices... | |
public void UpdateRenderingData() { | |
CreatureRenderModule.UpdateRenderingData( | |
creature_manager, | |
counter_clockwise, | |
ref vertices, | |
ref normals, | |
ref tangents, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MeshRenderBoneComposition comp = | |
creatureAsset.creature_manager.target_creature.render_composition; | |
List<MeshRenderRegion> regions = comp.getRegions(); | |
foreach (MeshRenderRegion region in regions) { | |
Rect r = new Rect(); | |
int uvIndex = region.getUVsIndex(); | |
for (int i = 0; i < region.getNumPts(); i++) { | |
Vector2 p = new Vector2(region.store_uvs[uvIndex], region.store_uvs[uvIndex + 1]); | |
if (i == 0) { | |
r.xMax = r.xMin = (float)p.x; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MeshRenderBoneComposition comp = | |
creatureAsset.creature_manager.target_creature.render_composition; | |
List<MeshRenderRegion> regions = comp.getRegions(); | |
foreach (MeshRenderRegion region in regions) { | |
Rect r = new Rect(); | |
int uvIndex = region.getUVsIndex(); | |
for (int i = 0; i < region.getNumPts(); i++) { | |
Vector2 p = new Vector2(region.store_uvs[uvIndex], region.store_uvs[uvIndex + 1]); | |
if (i == 0) { | |
r.xMax = r.xMin = (float)p.x; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WorldObjectNetworkObject wno = NetworkManager.Instance.WorldObjectNetworkObject.GetComponent<WorldObjectBehavior> ().networkObject; | |
// None of these fire: | |
wno.pendingInitialized += delegate(INetworkBehavior behavior, NetworkObject networkObject) { | |
Debug.Log ("[GLOBAL] PENDING initialized " + behavior); | |
}; | |
wno.onReady += delegate { | |
Debug.Log ("[GLOBAL] onReady"); | |
}; | |
wno.readBinary += delegate(BeardedManStudios.BMSByte data) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEngine.Rendering; | |
using UnityEditor; | |
using IsoTools.Tiled; | |
using IsoTools.Internal; | |
using System; | |
using System.IO; | |
using System.Linq; | |
using System.Collections.Generic; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Direction.swift | |
// ForeverMaze | |
// | |
// Created by Zane Claes on 1/18/16. | |
// Copyright © 2016 inZania LLC. All rights reserved. | |
// | |
import Foundation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Animation.swift | |
// ForeverMaze | |
// | |
// Created by Zane Claes on 1/18/16. | |
// Copyright © 2016 inZania LLC. All rights reserved. | |
// | |
import SpriteKit | |
import PromiseKit |