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
| // | |
| //AutoBlink.cs | |
| //オート目パチスクリプト | |
| //2014/06/23 N.Kobayashi | |
| //2016/09/19 dakjal | |
| // ライセンスについてはユニティちゃんライセンス(http://unity-chan.com/contents/license_jp/)を参照. | |
| // | |
| using UnityEngine; | |
| using System.Collections; |
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; | |
| public class NewBehaviourScript : MonoBehaviour { | |
| readonly int ARRAY_LENGTH = 1000; | |
| int[] values; | |
| GameObject[] objects; | |
| void Awake() { | |
| objects = new GameObject[ARRAY_LENGTH]; |
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
| // BEGIN MIT LICENSE BLOCK // | |
| // | |
| // Copyright (c) 2016 dskjal | |
| // This software is released under the MIT License. | |
| // http://opensource.org/licenses/mit-license.php | |
| // | |
| // END MIT LICENSE BLOCK // | |
| /* 使い方 | |
| public GameObject Prefab; | |
| private InstancePool enemyPool; |
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 System.Collections; | |
| public class Coroutine : MonoBehaviour { | |
| [SerializeField]float interval = 1; | |
| void Start () { | |
| StartCoroutine(coroutine()); | |
| } |
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
| // BEGIN MIT LICENSE BLOCK // | |
| // | |
| // Copyright (c) 2016 dskjal | |
| // This software is released under the MIT License. | |
| // http://opensource.org/licenses/mit-license.php | |
| // | |
| // END MIT LICENSE BLOCK // | |
| /* 使い方 | |
| [SerializeField] | |
| float interval = 1; |
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
| struct ItemData{ | |
| int ItemID; | |
| // その他のフィールド変数 | |
| } | |
| class ItemDB{ | |
| private ItemData items[]; | |
| public ItemData this[int i]{ | |
| get{ | |
| return items[i] | |
| } |
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
| enum ItemStatus{ | |
| Delete, | |
| CannotUse | |
| } | |
| interface IItem{ | |
| ItemStatus Use(); | |
| //そのほかの GetName() のような便利なメソッド | |
| } |
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
| class PlayerData{ | |
| public int HP; | |
| // そのほかのパラメータ | |
| } | |
| enum EffectStatus{ | |
| TimeOut | |
| } | |
| interface IEffect{ |
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
| ''' old code | |
| # Create list of layer name/row pairs | |
| layer_layout = [] | |
| for l in metarig.data.rigify_layers: | |
| print( l.name ) | |
| layer_layout += [(l.name, l.row)] | |
| end old code''' | |
| # new code | |
| # Create list of layer name/row pairs |
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
| import bpy | |
| #アクティブなアーマチュアのすべてが対象 | |
| for bone in bpy.context.active_object.pose.bones: | |
| for c in bone.constraints: | |
| #Constraint の名前で削除 | |
| if c.name == 'Limit Location': | |
| bone.constraints.remove(c) | |
| break | |
| #Constraint の型で削除 |