This file contains 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
// PlayerがAnimationを持っているGameObject | |
foreach (AnimationState anim in Player.animation) | |
{ | |
Debug.Log (anim.name); | |
} |
This file contains 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
// PlayerがAnimationを持っているGameObject | |
//変更するアニメ探し | |
string[] AnimeArrayAfter = { | |
"idle","run","walk", | |
}; | |
ArrayList ChangeAnimeNameList = new ArrayList (); | |
ArrayList ChangeAnimeNameAfterList = new ArrayList (); |
This file contains 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
void Start () | |
{ | |
//photonを利用するための初期設定 ロビーを作成して入る? | |
PhotonNetwork.ConnectUsingSettings("0.1"); | |
} | |
//PhotonNetwork.ConnectUsingSettingsを行うと呼ばれる | |
void OnJoinedLobby() | |
{ | |
//ランダムにルームに入る |
This file contains 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 System.Collections; | |
[RequireComponent (typeof(PhotonView))] | |
[RequireComponent (typeof(PlayerAnimScript))] //Animationの設定を行うスクリプト | |
public class NetworkPlayer : Photon.MonoBehaviour | |
{ | |
private Vector3 correctPlayerPos = Vector3.zero; | |
private Quaternion correctPlayerRot = Quaternion.identity; |
This file contains 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 System.Collections; | |
public class PlayerAnimScript : MonoBehaviour | |
{ | |
//Animationの種類 | |
public enum AnimeName | |
{ | |
idle, | |
run, |
This file contains 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 System.Collections; | |
[RequireComponent (typeof(PhotonView))] | |
[RequireComponent (typeof(PlayerAnimScript))] //Animationの設定を行うスクリプト | |
public class NetworkPlayer : Photon.MonoBehaviour | |
{ | |
private Vector3 correctPlayerPos = Vector3.zero; | |
private Quaternion correctPlayerRot = Quaternion.identity; |
This file contains 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 System.Collections; | |
public class NameScript : MonoBehaviour | |
{ | |
public GameObject NameLabel; | |
private float RandNum; | |
This file contains 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 System.Collections; | |
public static class Encryption { | |
//================================================================================= | |
//保存 | |
//================================================================================= | |
public static void SaveInt(string key, int value){ |
This file contains 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 System.Collections; | |
public class JoyStick : MonoBehaviour { | |
public GameObject AttachJoyStickSprite, AttachJoyStickBackSprite; | |
public Camera AttachGUICamera; | |
private Vector2 _position; | |
public Vector2 Position{ |
This file contains 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
-(NSUserDefaults*)GetDef:(NSString*)key{ | |
NSString *subStr = [key substringFromIndex:[key length] - 1]; | |
NSString *defKey = [NSString stringWithFormat:@"%d%@", [key length], subStr]; | |
NSUserDefaults* def = [[NSUserDefaults alloc] initWithSuiteName:defKey]; | |
return def; | |
} |