96 |
96 |
97 cxstring asc_behavior_get_name(const AscBehavior *behavior) { |
97 cxstring asc_behavior_get_name(const AscBehavior *behavior) { |
98 assert(behavior != NULL); |
98 assert(behavior != NULL); |
99 return cx_strcast(behavior->name); |
99 return cx_strcast(behavior->name); |
100 } |
100 } |
|
101 |
|
102 // TODO: add asc_behavior_find() and asc_behavior_find_global() |
|
103 |
|
104 void asc_behavior_enable_all(AscSceneNode *node) { |
|
105 CxIterator iter = cxListIterator(node->behaviors); |
|
106 cx_foreach(AscBehavior*, behavior, iter) { |
|
107 behavior->enabled = true; |
|
108 } |
|
109 } |
|
110 |
|
111 void asc_behavior_disable_all(AscSceneNode *node) { |
|
112 CxIterator iter = cxListIterator(node->behaviors); |
|
113 cx_foreach(AscBehavior*, behavior, iter) { |
|
114 behavior->enabled = false; |
|
115 } |
|
116 } |