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 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
-(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; | |
} |
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
//バックアップ対象から外す | |
- (NSString *)myDocumentsPath | |
{ | |
NSString *documentsPath = [NSHomeDirectory() stringByAppendingPathComponent:@"Library/Preferences"]; | |
return documentsPath; | |
} | |
- (BOOL)addSkipBackupAttributeToItemAtURL:(NSURL *)URL | |
{ | |
assert([[NSFileManager defaultManager] fileExistsAtPath: [URL path]]); |
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 System; | |
using System.IO; | |
using System.Text; | |
using UnityEditor; | |
using UnityEditorInternal; | |
using UnityEngine; | |
/// <summary> | |
/// オーディオのファイル名を定数で管理するクラスを作成するスクリプト | |
/// </summary> |
OlderNewer