34 lines
640 B
GDScript
34 lines
640 B
GDScript
extends Node
|
|
|
|
#不同族群单位之间的初始好感度
|
|
#下面意思为测试族群1对2具有初始负面好感
|
|
#相反2对1具有正面好感
|
|
var init_favour:Dictionary={
|
|
#测试族群1
|
|
"test_1":{
|
|
#对测试族群2的初始好感度为-10
|
|
"test_1":-100,
|
|
"test_2":-100,
|
|
"player":-100,
|
|
},
|
|
"test_2":{
|
|
|
|
"test_2":-100,
|
|
"test_1":-100,
|
|
"player":-100,
|
|
|
|
}
|
|
}
|
|
#获取初始好感度
|
|
func get_init_favour(self_type:String,other_type:String):
|
|
if not init_favour.has(self_type):
|
|
return 0
|
|
var favour_dic=init_favour[self_type]
|
|
if not favour_dic.has(other_type):
|
|
return 0
|
|
else:
|
|
return favour_dic[other_type]
|
|
|
|
|
|
pass
|