コード例 #1
0
 // Use this for initialization
 void Awake()
 {
     rigid  = GetComponent <Rigidbody2D>();
     vfx    = GetComponent <VisualAnimate>();
     coll   = GetComponent <Collider2D>();
     bumped = GetComponent <LastBumped>();
     bumped.Subscribe(this);
 }
コード例 #2
0
    protected virtual void Start()
    {
        VisualAnimate animator = GetComponentInParent <VisualAnimate>();

        if (animator != null)
        {
            animator.targets[0] = GetComponent <Renderer>();
        }
        rigid = GetComponentInParent <Rigidbody2D>();
    }
コード例 #3
0
 // Use this for initialization
 void Awake()
 {
     action = GetComponent <InputToAction>();
     vfx    = GetComponent <VisualAnimate>();
 }